Skip to content

Commit 32b86b4

Browse files
committed
ci: switch code coverage to codecov
1 parent 7a2b5ab commit 32b86b4

1 file changed

Lines changed: 18 additions & 19 deletions

File tree

.github/workflows/test.yml

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,13 @@ env:
1010
CARGO_TERM_COLOR: always
1111

1212
jobs:
13-
coverage:
14-
runs-on: ubuntu-latest
15-
16-
steps:
17-
- uses: actions/checkout@v4
18-
env:
19-
fetch-depth: 0
20-
21-
- name: Push to coveralls.io
22-
env:
23-
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
24-
run: |
25-
cargo install cargo-tarpaulin
26-
cargo tarpaulin --all-targets --all-features --ciserver github-ci --coveralls $COVERALLS_REPO_TOKEN --engine llvm
27-
28-
test:
13+
build:
2914
runs-on: ubuntu-latest
3015

3116
steps:
3217
- uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 2
3320

3421
- name: Build
3522
run: cargo build --verbose --all-targets
@@ -47,6 +34,18 @@ jobs:
4734
run: cargo test --verbose --all-targets --all-features
4835

4936
- name: Clippy (All Features)
50-
run: |
51-
rustup component add clippy
52-
cargo clippy --all-targets --all-features
37+
run: cargo clippy --all-targets --all-features
38+
39+
- name: Install cargo-llvm-cov
40+
uses: taiki-e/install-action@cargo-llvm-cov
41+
42+
- name: Generate code coverage
43+
run: cargo llvm-cov --all-targets --all-features --workspace --lcov --output-path lcov.info
44+
45+
- name: Upload coverage to Codecov
46+
uses: codecov/codecov-action@v3
47+
with:
48+
token: ${{ secrets.CODECOV_TOKEN }}
49+
files: lcov.info
50+
fail_ci_if_error: true
51+
slug: TimelessOS/LCAS

0 commit comments

Comments
 (0)