Skip to content

Commit 2e6fe12

Browse files
committed
ci: overhaul coverage workflow
1 parent 070aed8 commit 2e6fe12

File tree

4 files changed

+79
-44
lines changed

4 files changed

+79
-44
lines changed

.github/workflows/codecov.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

.github/workflows/coverage.yaml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Coverage
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
env:
8+
CARGO_TERM_COLOR: always
9+
10+
jobs:
11+
report:
12+
name: Report
13+
runs-on: ubuntu-latest
14+
env:
15+
CARGO_INCREMENTAL: "0"
16+
RUSTFLAGS: "-Z profile -C codegen-units=1 -C inline-threshold=0 -C link-dead-code -C overflow-checks=off -C panic=abort -Z panic_abort_tests"
17+
RUSTDOCFLAGS: "-Z profile -C codegen-units=1 -C inline-threshold=0 -C link-dead-code -C overflow-checks=off -C panic=abort -Z panic_abort_tests"
18+
19+
steps:
20+
- id: checkout
21+
name: Checkout Repository
22+
uses: actions/checkout@v3
23+
24+
- id: setup
25+
name: Setup Toolchain
26+
uses: dtolnay/rust-toolchain@stable
27+
with:
28+
toolchain: nightly
29+
components: llvm-tools-preview
30+
31+
- id: cache
32+
name: Enable Workflow Cache
33+
uses: Swatinem/rust-cache@v2
34+
35+
- id: tools
36+
name: Install Tools
37+
uses: taiki-e/install-action@v2
38+
with:
39+
tool: grcov
40+
41+
- id: imdl
42+
name: Install Intermodal
43+
run: cargo install imdl
44+
45+
- id: check
46+
name: Run Build Checks
47+
run: cargo check --workspace --all-targets --all-features
48+
49+
- id: test
50+
name: Run Unit Tests
51+
run: cargo test --workspace --all-targets --all-features
52+
53+
- id: coverage
54+
name: Generate Coverage Report
55+
uses: alekitto/[email protected]
56+
57+
- id: upload
58+
name: Upload Coverage Report
59+
uses: codecov/codecov-action@v3
60+
with:
61+
files: ${{ steps.coverage.outputs.report }}
62+
verbose: true
63+
fail_ci_if_error: true

codecov.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
coverage:
2+
status:
3+
project:
4+
default:
5+
target: auto
6+
threshold: 0.5%

project-words.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
actix
22
addrs
3+
alekitto
34
AUTOINCREMENT
45
bencode
56
bencoded
67
Benoit
78
binascii
89
btih
910
chrono
11+
codecov
12+
codegen
1013
compatiblelicenses
1114
creativecommons
1215
creds
@@ -16,6 +19,8 @@ datetime
1619
DATETIME
1720
Dont
1821
dotless
22+
dtolnay
23+
grcov
1924
Grünwald
2025
hasher
2126
Hasher
@@ -27,6 +32,7 @@ imdl
2732
indexadmin
2833
indexmap
2934
infohash
35+
Intermodal
3036
jsonwebtoken
3137
leechers
3238
Leechers
@@ -49,13 +55,17 @@ reqwest
4955
Roadmap
5056
ROADMAP
5157
rowid
58+
RUSTDOCFLAGS
59+
RUSTFLAGS
5260
sgxj
5361
singlepart
5462
sqlx
5563
strftime
5664
sublicensable
5765
sublist
5866
subpoints
67+
Swatinem
68+
taiki
5969
tempdir
6070
tempfile
6171
thiserror

0 commit comments

Comments
 (0)