Commit 1b221f16 authored by Liam Horne's avatar Liam Horne

refactor: remove repo since since files are now in monorepo

parent 7b25a75e
root = true
# defaults
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[*.sol]
indent_size = 4
# name of the network to deploy to e.g., kovan or mainnet
CONTRACTS_TARGET_NETWORK=
# private key for the account that will execute the deploy
CONTRACTS_DEPLOYER_KEY=
# rpc url for the node that will receive deploy transactions
CONTRACTS_RPC_URL=
* @smartcontracts @ben-chain @maurelian
name: CI - contracts
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build-test-lint:
name: Run Contracts Test Suite on Node ${{matrix.node}}
runs-on: ubuntu-latest
strategy:
matrix:
node: [ '10', '12', '14' ]
steps:
- uses: actions/checkout@v2
- name: Setup node ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
# START DEPENDENCY CACHING
- name: Cache root deps
uses: actions/cache@v1
id: cache_base
with:
path: node_modules
key: ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('package.json') }}
# END DEPENDENCY CACHING
- name: Install Dependencies
run: yarn install
- name: Lint
run: yarn lint:check
- name: Build
run: |
yarn clean
yarn build
- name: Test
run: yarn test
name: Build & Push to DockerHub
on:
push:
branches:
- master
- testnet
- uat
jobs:
build:
name: Build & Push to DockerHub
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: webfactory/ssh-agent@v0.4.1
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY_READ }}
- name: Login to DockerHub Registry
run: echo ${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }} | docker login -u ${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME}} --password-stdin
- name: Build and push Deployer image to DockerHub
run: |
git clone https://github.com/ethereum-optimism/docker.git \
$HOME/docker
cd $HOME/docker
BRANCH=${GITHUB_REF##*/}
./build.sh -s deployer -b $BRANCH
if [ $BRANCH == 'master' ]; then
docker push ethereumoptimism/deployer:latest
elif [[ $BRANCH == 'uat' || $BRANCH == 'testnet' ]]; then
docker push ethereumoptimism/deployer:$BRANCH
fi
- name: Logout of DockerHub
run: docker logout
name: Setup & Run Integration Test Suite
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
name: Setup & Run Integration Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: |
git clone https://github.com/ethereum-optimism/optimism-integration.git \
$HOME/optimism-integration
cd $HOME/optimism-integration
sed -i -Ee's#git@github.com:([^/]*)/(.*).git#https://github.com/\1/\2.git#' .gitmodules
git submodule init
git submodule update
if [ -z $GITHUB_HEAD_REF ]; then
GITHUB_HEAD_REF=${GITHUB_REF##*/}
fi
GIT_COMMIT=$(git rev-parse HEAD | head -c 8)
REMOTE=${{ github.event.pull_request.head.repo.html_url }}
echo "optimism-integration $GIT_COMMIT"
if [ -z $REMOTE ]; then
./docker/build.sh -s deployer -b $GITHUB_HEAD_REF
else
./docker/build.sh -s deployer -b $GITHUB_HEAD_REF -r $REMOTE
fi
- name: Test
run: |
cd $HOME/optimism-integration
DEPLOYER_TAG=$GITHUB_HEAD_REF ./test.sh
name: Update submodules in integration repo
on:
push:
branches:
- master
jobs:
run:
name: Update submodules
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: webfactory/ssh-agent@v0.4.1
with:
ssh-private-key: ${{ secrets.INTEGRATION_PUSH_ACTION }}
- name: Clone repo
run: |
git clone git@github.com:ethereum-optimism/optimism-integration.git $HOME/optimism-integration
cd $HOME/optimism-integration
git submodule init && git submodule update
REPO=$(echo $GITHUB_REPOSITORY | cut -d '/' -f2)
cd $HOME/optimism-integration/$REPO
git pull origin master
- name: Commit
run: |
git config --global user.email "action@github.com"
git config --global user.name "GitHub Action"
cd $HOME/optimism-integration
REPO=$(echo $GITHUB_REPOSITORY | cut -d '/' -f2)
SHORT=$(echo $GITHUB_SHA | head -c 8)
git add $REPO
git commit -m "submodule bump: $REPO $SHORT"
git push origin master
name: Auto tag-release-publish
on:
push:
branches:
- master
jobs:
tag:
name: Create tag for new version
runs-on: ubuntu-latest
outputs:
tag_name: ${{ steps.create_new_tag.outputs.tag }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
- uses: salsify/action-detect-and-tag-new-version@v2
id: create_new_tag
release:
name: Create release
runs-on: ubuntu-latest
needs: tag
if: needs.tag.outputs.tag_name
steps:
- uses: actions/checkout@v2
- uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ needs.tag.outputs.tag_name }}
release_name: ${{ needs.tag.outputs.tag_name }}
draft: false
prerelease: false
npm-publish:
name: Build and publish
runs-on: ubuntu-latest
needs: tag
if: needs.tag.outputs.tag_name
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14.x'
registry-url: 'https://registry.npmjs.org'
- run: yarn
- run: yarn build
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
docker:
name: Build & Push to DockerHub
runs-on: ubuntu-latest
needs: tag
if: needs.tag.outputs.tag_name
steps:
- uses: actions/checkout@v2
- name: Login to DockerHub Registry
run: echo ${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }} | docker login -u ${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME}} --password-stdin
- name: Clone the docker repo
run: |
git clone https://github.com/ethereum-optimism/docker.git \
$HOME/docker
- name: Build and push Deployer image to DockerHub
run: |
cd $HOME/docker
./build.sh -s deployer -b ${{ needs.tag.outputs.tag_name }}
docker push ethereumoptimism/deployer:${{ needs.tag.outputs.tag_name }}
- name: Extract State Dump from Deployer Image
run: docker run --rm --entrypoint cat ethereumoptimism/deployer:${{ steps.get_version.outputs.VERSION }} /opt/contracts/build/dumps/state-dump.latest.json > ${{ steps.get_version.outputs.VERSION }}.json
- name: Store state dump artifact for git job
uses: actions/upload-artifact@v2
with:
name: state-dump-artifact
path: ${{ steps.get_version.outputs.VERSION }}.json
- name: Logout of DockerHub
run: docker logout
git:
name: Commit State Dump
needs: [docker, tag]
runs-on: ubuntu-latest
if: needs.tag.outputs.tag_name
steps:
- uses: actions/checkout@v2
with:
repository: ethereum-optimism/regenesis
ssh-key: ${{ secrets.REGENESIS_DEPLOY_KEY }}
- name: Download State Dump Artifact
uses: actions/download-artifact@v2
with:
name: state-dump-artifact
path: ./tags
- name: Commit to Repository
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: master
commit_message: Add tagged state dump artfiact
commit_user_name: GitHub Action
commit_user_email: action@github.com
commit_author: Github Action <action@github.com>
node_modules/
artifacts/
artifacts-ovm/
cache/
cache-ovm/
yarn-error.log
build/
.DS_STORE
# Coverage output
coverage/
coverage.json
# Environment variables
.env
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment