Created
November 9, 2022 19:46
-
-
Save brockelmore/ce57ea765baf6ff3ab1c503de6405b7d to your computer and use it in GitHub Desktop.
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
name: Tests | |
on: [push, pull_request] | |
jobs: | |
check: | |
name: Foundry project | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Install Foundry | |
uses: onbjerg/foundry-toolchain@v1 | |
with: | |
version: nightly | |
- name: Install dependencies | |
run: forge install | |
- name: Build | |
run: forge build --sizes | |
- name: Run tests | |
run: forge test -vvv | |
- name: Generate coverage | |
run: forge coverage --report lcov | |
- name: Setup LCOV | |
uses: hrishikesh-kadam/setup-lcov@v1 | |
- name: Filter lcov | |
run: lcov -r lcov.info "test/*" -o lcov-filtered.info --rc lcov_branch_coverage=1 | |
- name: Report code coverage | |
uses: zgosalvez/github-actions-report-lcov@v1 | |
with: | |
coverage-files: ./lcov-filtered.info | |
artifact-name: code-coverage-report | |
github-token: ${{ secrets.GITHUB_TOKEN }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment