Skip to content

Commit

Permalink
add support for extra code coverage params
Browse files Browse the repository at this point in the history
  • Loading branch information
Tofel committed Aug 14, 2024
1 parent 677e149 commit 3db3e36
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/solidity-foundry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
{ "name": "liquiditymanager", "setup": { "run-coverage": true, "min-coverage": 46.3, "run-gas-snapshot": true, "run-forge-fmt": false }},
{ "name": "llo-feeds", "setup": { "run-coverage": true, "min-coverage": 49.3, "run-gas-snapshot": true, "run-forge-fmt": false }},
{ "name": "operatorforwarder", "setup": { "run-coverage": true, "min-coverage": 55.7, "run-gas-snapshot": true, "run-forge-fmt": false }},
{ "name": "shared", "setup": { "run-coverage": true, "min-coverage": 32.6, "run-gas-snapshot": true, "run-forge-fmt": false }},
{ "name": "shared", "setup": { "run-coverage": true, "extra-coverage-params": "--no-match-path='*CallWithExactGas*'", "min-coverage": 32.6, "run-gas-snapshot": true, "run-forge-fmt": false }},
{ "name": "transmission", "setup": { "run-coverage": true, "min-coverage": 65.6, "run-gas-snapshot": true, "run-forge-fmt": false }},
{ "name": "vrf", "setup": { "run-coverage": false, "min-coverage": 98.5, "run-gas-snapshot": false, "run-forge-fmt": false }}
]
Expand Down Expand Up @@ -208,7 +208,13 @@ jobs:
|| needs.changes.outputs.non_src_changes == 'true')
&& matrix.product.setup.run-coverage }}
working-directory: contracts
run: forge coverage --report lcov --no-match-coverage "(ExactGas)"
shell: bash
run: |
if [[ -n "${{ matrix.product.setup.extra-coverage-params }}" ]]; then
forge coverage --report lcov ${{ matrix.product.setup.extra-coverage-params }}
else
forge coverage --report lcov
fi
env:
FOUNDRY_PROFILE: ${{ matrix.product.name }}

Expand Down

0 comments on commit 3db3e36

Please sign in to comment.