Skip to content

Commit

Permalink
chore(ci): push l1-contracts tests off of critical path (#6400)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
TomAFrench committed May 15, 2024
1 parent c3efb9c commit ce0ae6d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 7 additions & 2 deletions l1-contracts/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
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

0 comments on commit ce0ae6d

Please sign in to comment.