-
Notifications
You must be signed in to change notification settings - Fork 347
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
be7118b
commit 6d71de4
Showing
1 changed file
with
6 additions
and
4 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
||
|
@@ -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, | ||
|
@@ -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 | ||
|
@@ -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. |