Skip to content

Commit 10bd88e

Browse files
committed
ci: overhaul coverage workflow
1 parent cf4fb22 commit 10bd88e

File tree

3 files changed

+64
-44
lines changed

3 files changed

+64
-44
lines changed

.github/workflows/codecov.yml

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

.github/workflows/coverage.yaml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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+
run: cargo install imdl
38+
39+
- id: check
40+
name: Run Build-Checks
41+
run: cargo check --workspace --all-targets --all-features
42+
43+
- id: test
44+
name: Run Unit Tests
45+
run: cargo test --workspace --all-targets --all-features
46+
47+
- id: coverage
48+
name: Generate Coverage Report
49+
uses: alekitto/[email protected]
50+
51+
- id: upload
52+
name: Upload Coverage Report
53+
uses: codecov/codecov-action@v3
54+
with:
55+
files: ${{ steps.coverage.outputs.report }}
56+
flag: rust
57+
verbose: true
58+
fail_ci_if_error: true

project-words.txt

Lines changed: 6 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,7 @@ datetime
1619
DATETIME
1720
Dont
1821
dotless
22+
dtolnay
1923
Grünwald
2024
hasher
2125
Hasher
@@ -49,13 +53,15 @@ reqwest
4953
Roadmap
5054
ROADMAP
5155
rowid
56+
RUSTFLAGS
5257
sgxj
5358
singlepart
5459
sqlx
5560
strftime
5661
sublicensable
5762
sublist
5863
subpoints
64+
Swatinem
5965
tempdir
6066
tempfile
6167
thiserror

0 commit comments

Comments
 (0)