Skip to content

Commit 66c5277

Browse files
authored
Create coverage.yml for running forge coverage
1 parent 14f4c8c commit 66c5277

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/coverage.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Coverage
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
env:
10+
FOUNDRY_PROFILE: ci
11+
12+
jobs:
13+
coverage:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
submodules: recursive
20+
21+
- name: Install Foundry
22+
uses: foundry-rs/foundry-toolchain@v1
23+
with:
24+
version: nightly
25+
26+
- name: Run coverage
27+
run: |
28+
forge coverage --report lcov
29+
30+
- name: Upload coverage to Codecov
31+
uses: codecov/codecov-action@v3
32+
with:
33+
token: ${{ secrets.CODECOV_TOKEN }}
34+
files: ./lcov.info
35+
fail_ci_if_error: true

0 commit comments

Comments
 (0)