Edit proposal #43
This file contains hidden or 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
| name: Coverage | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| - edit-proposal | |
| paths: | |
| - pkg/contracts/**/* | |
| - foundry.toml | |
| - .github/workflows/coverage.yml | |
| pull_request: | |
| paths: | |
| - pkg/contracts/**/* | |
| - foundry.toml | |
| - .github/workflows/coverage.yml | |
| permissions: | |
| contents: read | |
| jobs: | |
| coverage: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: false | |
| - name: Install Foundry | |
| uses: foundry-rs/foundry-toolchain@v1 | |
| with: | |
| version: nightly | |
| - name: Init required submodules | |
| run: git submodule update --init --recursive --depth 1 --jobs 4 | |
| - name: Run coverage | |
| run: forge coverage --ir-minimum --match-path 'pkg/contracts/test/**' --exclude-tests --skip script --report lcov | |
| - name: Upload coverage report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: forge-coverage-lcov | |
| path: lcov.info | |
| if-no-files-found: warn | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} |