Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overhaul Coverage Workflow #245

Merged
merged 1 commit into from
Aug 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 0 additions & 44 deletions .github/workflows/codecov.yml

This file was deleted.

63 changes: 63 additions & 0 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Coverage

on:
push:
pull_request:

env:
CARGO_TERM_COLOR: always

jobs:
report:
name: Report
runs-on: ubuntu-latest
env:
CARGO_INCREMENTAL: "0"
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"
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"

steps:
- id: checkout
name: Checkout Repository
uses: actions/checkout@v3

- id: setup
name: Setup Toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
components: llvm-tools-preview

- id: cache
name: Enable Workflow Cache
uses: Swatinem/rust-cache@v2

- id: tools
name: Install Tools
uses: taiki-e/install-action@v2
with:
tool: grcov

- id: imdl
name: Install Intermodal
run: cargo install imdl

- id: check
name: Run Build Checks
run: cargo check --workspace --all-targets --all-features

- id: test
name: Run Unit Tests
run: cargo test --workspace --all-targets --all-features

- id: coverage
name: Generate Coverage Report
uses: alekitto/grcov@v0.2

- id: upload
name: Upload Coverage Report
uses: codecov/codecov-action@v3
with:
files: ${{ steps.coverage.outputs.report }}
verbose: true
fail_ci_if_error: true
6 changes: 6 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
coverage:
status:
project:
default:
target: auto
threshold: 0.5%
10 changes: 10 additions & 0 deletions project-words.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
actix
addrs
alekitto
AUTOINCREMENT
bencode
bencoded
Benoit
binascii
btih
chrono
codecov
codegen
compatiblelicenses
creativecommons
creds
Expand All @@ -16,6 +19,8 @@ datetime
DATETIME
Dont
dotless
dtolnay
grcov
Grünwald
hasher
Hasher
Expand All @@ -27,6 +32,7 @@ imdl
indexadmin
indexmap
infohash
Intermodal
jsonwebtoken
leechers
Leechers
Expand All @@ -49,13 +55,17 @@ reqwest
Roadmap
ROADMAP
rowid
RUSTDOCFLAGS
RUSTFLAGS
sgxj
singlepart
sqlx
strftime
sublicensable
sublist
subpoints
Swatinem
taiki
tempdir
tempfile
thiserror
Expand Down