contracts upgrade #412
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI Workflow | |
on: | |
pull_request: | |
branches: | |
- 'release/**' | |
- develop | |
jobs: | |
op-node-lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: go.mod | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
working-directory: op-node | |
version: latest | |
args: -E goimports,sqlclosecheck,bodyclose,asciicheck,misspell,errorlint --timeout 5m -e "errors.As" -e "errors.Is" | |
op-batcher-lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: go.mod | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
working-directory: op-batcher | |
version: latest | |
args: -E goimports,sqlclosecheck,bodyclose,asciicheck,misspell,errorlint --timeout 5m -e "errors.As" -e "errors.Is" | |
op-proposer-lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: go.mod | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
working-directory: op-proposer | |
version: latest | |
args: -E goimports,sqlclosecheck,bodyclose,asciicheck,misspell,errorlint --timeout 5m -e "errors.As" -e "errors.Is" | |
op-service-lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: go.mod | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
working-directory: op-service | |
version: latest | |
args: -E goimports,sqlclosecheck,bodyclose,asciicheck,misspell,errorlint --timeout 5m -e "errors.As" -e "errors.Is" | |
op-node-test: | |
runs-on: ubuntu-latest | |
needs: op-node-lint | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: go.mod | |
- name: Install gotestsum | |
uses: autero1/[email protected] | |
with: | |
gotestsum_version: 1.10.0 | |
- name: Run tests | |
working-directory: op-node | |
run: | | |
gotestsum --format=testname --junitfile=/tmp/test-results/op-node.xml -- -parallel=2 -coverpkg=github.com/ethereum-optimism/optimism/... -coverprofile=coverage.out ./... | |
- name: Publish Test Report | |
uses: mikepenz/action-junit-report@v3 | |
if: success() || failure() # always run even if the previous step fails | |
with: | |
report_paths: '/tmp/test-results/op-node.xml' | |
op-batcher-test: | |
runs-on: ubuntu-latest | |
needs: op-batcher-lint | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: go.mod | |
- name: Install gotestsum | |
uses: autero1/[email protected] | |
with: | |
gotestsum_version: 1.10.0 | |
- name: Run tests | |
working-directory: op-batcher | |
run: | | |
gotestsum --format=testname --junitfile=/tmp/test-results/op-batcher.xml -- -parallel=2 -coverpkg=github.com/ethereum-optimism/optimism/... -coverprofile=coverage.out ./... | |
- name: Publish Test Report | |
uses: mikepenz/action-junit-report@v3 | |
if: success() || failure() # always run even if the previous step fails | |
with: | |
report_paths: '/tmp/test-results/op-batcher.xml' | |
op-proposer-test: | |
runs-on: ubuntu-latest | |
needs: op-proposer-lint | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: go.mod | |
- name: Install gotestsum | |
uses: autero1/[email protected] | |
with: | |
gotestsum_version: 1.10.0 | |
- name: Run tests | |
working-directory: op-proposer | |
run: | | |
gotestsum --format=testname --junitfile=/tmp/test-results/op-proposer.xml -- -parallel=2 -coverpkg=github.com/ethereum-optimism/optimism/... -coverprofile=coverage.out ./... | |
- name: Publish Test Report | |
uses: mikepenz/action-junit-report@v3 | |
if: success() || failure() # always run even if the previous step fails | |
with: | |
report_paths: '/tmp/test-results/op-proposer.xml' | |
op-service-test: | |
runs-on: ubuntu-latest | |
needs: op-service-lint | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: go.mod | |
- name: Install gotestsum | |
uses: autero1/[email protected] | |
with: | |
gotestsum_version: 1.10.0 | |
- name: Run tests | |
working-directory: op-service | |
run: | | |
gotestsum --format=testname --junitfile=/tmp/test-results/op-service.xml -- -parallel=2 -coverpkg=github.com/ethereum-optimism/optimism/... -coverprofile=coverage.out ./... | |
- name: Publish Test Report | |
uses: mikepenz/action-junit-report@v3 | |
if: success() || failure() # always run even if the previous step fails | |
with: | |
report_paths: '/tmp/test-results/op-service.xml' | |
op-e2e-http-test: | |
runs-on: ubuntu-latest | |
needs: [op-node-test, op-batcher-test, op-proposer-test] | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: go.mod | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- uses: pnpm/action-setup@v3 | |
name: Install pnpm | |
with: | |
version: 9 | |
run_install: false | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- uses: actions/cache@v3 | |
name: Setup pnpm cache | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install dependencies | |
run: pnpm install | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
- name: Build dependencies | |
run: pnpm build | |
- name: Make file | |
run: make cannon-prestate && make devnet-allocs | |
- name: Install gotestsum | |
uses: autero1/[email protected] | |
with: | |
gotestsum_version: 1.10.0 | |
- name: Run tests | |
working-directory: op-e2e | |
run: | | |
OP_E2E_CANNON_ENABLED=false OP_E2E_USE_L2OO=true OP_TESTLOG_DISABLE_COLOR=true OP_E2E_DISABLE_PARALLEL=false OP_E2E_USE_HTTP=true gotestsum \ | |
--format=testname --junitfile=/tmp/test-results/op-e2e_http_true.xml \ | |
-- -timeout=30m -parallel=2 . ./... | |
- name: Publish Test Report | |
uses: mikepenz/action-junit-report@v3 | |
if: success() || failure() # always run even if the previous step fails | |
with: | |
report_paths: '/tmp/test-results/op-e2e_http_true.xml' |