From ce0ae6d8248d4adf9815db9339f0b86593b86fd2 Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Wed, 15 May 2024 20:09:03 +0100 Subject: [PATCH] chore(ci): push l1-contracts tests off of critical path (#6400) I noticed that we've currently put running `forge test` on `l1-contracts` on the critical path for CI such that e2e tests are blocked by it. These take ~3 mins to complete so I think it makes sense to run these in parallel. I've then made a new earthly target to run these tests separately. --- .github/workflows/ci.yml | 12 ++++++++++++ l1-contracts/Earthfile | 9 +++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 55858424531..3aeab526ec8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -333,6 +333,18 @@ jobs: timeout-minutes: 40 run: earthly-ci --no-output ./+barretenberg-acir-tests-bb.js + l1-contracts-test: + needs: setup + runs-on: ${{ github.event.pull_request.user.login || github.actor }}-x86 + steps: + - uses: actions/checkout@v4 + with: { ref: "${{ env.GIT_COMMIT }}" } + - uses: ./.github/ci-setup-action + with: + concurrency_key: l1-contracts-${{ github.event.pull_request.user.login || github.actor }}-x86 + - name: "Test l1 contracts" + run: earthly-ci --no-output ./l1-contracts+test + docs-preview: needs: build runs-on: ${{ github.event.pull_request.user.login || github.actor }}-x86 diff --git a/l1-contracts/Earthfile b/l1-contracts/Earthfile index 57d0a1c8a51..2df4d56e48a 100644 --- a/l1-contracts/Earthfile +++ b/l1-contracts/Earthfile @@ -8,5 +8,10 @@ build: # "slither": "forge clean && forge build --build-info --skip '*/test/**' --force && slither . --checklist --ignore-compile --show-ignored-findings --config-file ./slither.config.json | tee slither_output.md", # "slither-has-diff": "./slither_has_diff.sh" RUN solhint --config ./.solhint.json --fix "src/**/*.sol" - RUN forge clean && forge fmt --check && forge build && forge test --no-match-contract UniswapPortalTest - SAVE ARTIFACT /usr/src/l1-contracts /usr/src/l1-contracts \ No newline at end of file + RUN forge clean && forge fmt --check + RUN forge build + SAVE ARTIFACT /usr/src/l1-contracts /usr/src/l1-contracts + +test: + FROM +build + RUN forge test --no-match-contract UniswapPortalTest