fix: correct slither filter-paths regex #26
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: | |
| push: | |
| branches: | |
| - main | |
| - fix/** | |
| - feature/** | |
| - ci/** | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| coverage: | |
| name: "Forge Coverage → Codecov" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install Foundry toolchain | |
| uses: foundry-rs/foundry-toolchain@v1 | |
| with: | |
| version: stable | |
| - name: Install lcov | |
| run: sudo apt-get install -y lcov | |
| - name: Install Forge dependencies | |
| run: forge install | |
| - name: Generate coverage report (lcov) | |
| run: | | |
| forge coverage --report lcov | |
| # forge writes lcov.info to the project root by default | |
| ls -la lcov.info || (echo "lcov.info not found, listing root:" && ls -la) | |
| - name: Remove test and lib files from coverage | |
| run: | | |
| lcov \ | |
| --remove lcov.info \ | |
| '*/test/*' '*/lib/*' \ | |
| --output-file lcov.info \ | |
| --ignore-errors unused,empty \ | |
| || echo "lcov --remove returned non-zero (ok if nothing to remove)" | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| files: lcov.info | |
| flags: foundry | |
| name: solidity-dojo | |
| fail_ci_if_error: false | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Upload coverage summary artifact | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: coverage-summary | |
| path: | | |
| lcov.info | |
| retention-days: 1 |