Skip to content

Commit 5488165

Browse files
committed
Add codecov job.
1 parent adff244 commit 5488165

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/build.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
push:
66
branches:
77
- main
8+
- julio/codecov
89

910
jobs:
1011
build:
@@ -30,3 +31,21 @@ jobs:
3031
uses: qard/heaviest-objects-in-the-universe@v1
3132
with:
3233
github-token: ${{ secrets.GITHUB_TOKEN }}
34+
coverage:
35+
runs-on: ubuntu-latest
36+
env:
37+
CARGO_TERM_COLOR: always
38+
steps:
39+
- uses: actions/checkout@v4
40+
- name: Install Rust
41+
run: rustup update stable
42+
- name: Install cargo-llvm-cov
43+
uses: taiki-e/install-action@cargo-llvm-cov
44+
- name: Generate code coverage
45+
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
46+
- name: Upload coverage to Codecov
47+
uses: codecov/codecov-action@v3
48+
with:
49+
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
50+
files: lcov.info
51+
fail_ci_if_error: true

0 commit comments

Comments
 (0)