Skip to content

Commit 46a0167

Browse files
committed
add(coverage): push coverage to codecov.io
1 parent 4ef2834 commit 46a0167

File tree

1 file changed

+39
-15
lines changed

1 file changed

+39
-15
lines changed

.github/workflows/rust.yml

Lines changed: 39 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,34 +10,58 @@ env:
1010
CARGO_TERM_COLOR: always
1111

1212
jobs:
13-
build:
13+
cargo-deny:
1414
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
- uses: EmbarkStudios/cargo-deny-action@v1
1518

19+
build:
20+
runs-on: ubuntu-latest
1621
steps:
1722
- uses: actions/checkout@v3
18-
- name: Install Miri
19-
run: |
20-
rustup toolchain install nightly --component miri
21-
cargo +nightly miri setup
2223
- name: Build
2324
run: cargo build --verbose
24-
- name: Run tests
25-
run: cargo test --verbose
26-
- name: Run Miri on sync
27-
run: cargo +nightly miri test -p dot15d4
25+
- name: Format
26+
run: cargo fmt --check --verbose
27+
2828

2929
clippy:
30+
needs: [build]
3031
runs-on: ubuntu-latest
31-
3232
steps:
3333
- uses: actions/checkout@v3
34-
- name: Lints
34+
- name: Clippy
3535
run: cargo clippy --all-features --all-targets
36-
- name: Fmt
37-
run: cargo fmt --check --verbose
3836

39-
cargo-deny:
37+
tests:
38+
needs: [build]
4039
runs-on: ubuntu-latest
4140
steps:
4241
- uses: actions/checkout@v3
43-
- uses: EmbarkStudios/cargo-deny-action@v1
42+
- name: Install Miri
43+
run: |
44+
rustup toolchain install nightly --component miri
45+
cargo +nightly miri setup
46+
47+
- name: Tests
48+
run: cargo test --verbose
49+
- name: Miri
50+
run: cargo +nightly miri test --verbose
51+
52+
coverage:
53+
needs: [build]
54+
runs-on: ubuntu-latest
55+
steps:
56+
- uses: actions/checkout@v3
57+
- name: Install `llvm-cov`
58+
uses: taiki-e/install-action@cargo-llvm-cov
59+
- name: Coverage
60+
run: |
61+
cargo llvm-cov --no-report
62+
cargo llvm-cov report --lcov --output-path lcov.info
63+
- name: Upload coverage to Codecov
64+
uses: codecov/codecov-action@v3
65+
with:
66+
files: lcov.info
67+
fail_ci_if_error: false

0 commit comments

Comments
 (0)