Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vladbochok committed May 7, 2024
1 parent be7118b commit 6d71de4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/l1-contracts-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ jobs:
run: diff tools/data/Verifier.sol l1-contracts/contracts/state-transition/Verifier.sol

coverage:
defaults:
run:
working-directory: l1-contracts
needs: [build, lint]
runs-on: ubuntu-latest

Expand Down Expand Up @@ -179,7 +182,7 @@ jobs:
l1-contracts/typechain
- name: Run coverage
run: FOUNDRY_PROFILE=default yarn l1 test:foundry && FOUNDRY_PROFILE=default yarn l1 coverage:foundry --report summary --report lcov
run: FOUNDRY_PROFILE=default yarn test:foundry && FOUNDRY_PROFILE=default yarn coverage:foundry --report summary --report lcov

# To ignore coverage for certain directories modify the paths in this step as needed. The
# below default ignores coverage results for the test and script directories. Alternatively,
Expand All @@ -189,7 +192,6 @@ jobs:
# The `--rc lcov_branch_coverage=1` part keeps branch info in the filtered report, since lcov
# defaults to removing branch info.
- name: Filter directories
working-directory: l1-contracts
run: |
sudo apt update && sudo apt install -y lcov
lcov --remove lcov.info 'l1-contracts/test/*' 'l1-contracts/contracts/dev-contracts/*' 'l1-contracts/lib/*' --output-file lcov.info --rc lcov_branch_coverage=1
Expand All @@ -204,11 +206,11 @@ jobs:
uses: romeovs/[email protected]
with:
delete-old-comments: true
lcov-file: ./l1-contracts/lcov.info
lcov-file: ./lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }} # Adds a coverage summary comment to the PR.

- name: Verify minimum coverage
uses: zgosalvez/github-actions-report-lcov@v2
with:
coverage-files: ./l1-contracts/lcov.info
coverage-files: ./lcov.info
minimum-coverage: 80 # Set coverage threshold.

0 comments on commit 6d71de4

Please sign in to comment.