Skip to content

Commit

Permalink
Replace deprecated actions
Browse files Browse the repository at this point in the history
  • Loading branch information
pnehrer committed Apr 21, 2024
1 parent 8838a88 commit 7c19e56
Showing 1 changed file with 5 additions and 18 deletions.
23 changes: 5 additions & 18 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,9 @@ jobs:
with:
components: rustfmt, clippy
- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
run: cargo fmt --all -- --check
- name: Run clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all -- -D warnings
run: cargo clippy --all -- -D warnings

coverage:
name: Run tests with coverage
Expand All @@ -37,28 +31,21 @@ jobs:
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Build the binary
uses: actions-rs/cargo@v1
with:
command: build
run: cargo build
env:
CARGO_INCREMENTAL: '0'
RUSTC_BOOTSTRAP: '1'
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
- name: Run unit tests
uses: actions-rs/cargo@v1
with:
command: test
run: cargo test
env:
CARGO_INCREMENTAL: '0'
RUSTC_BOOTSTRAP: '1'
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
- name: Install grcov
uses: actions-rs/cargo@v1
with:
command: install
args: 'grcov --version 0.8.9'
run: cargo install grcov --version 0.8.9
- name: Run grcov
run: grcov . -s . --binary-path ./target/debug/ --excl-start '^mod\s+tests\s*\{$' -t covdir --branch --ignore-not-existing --keep-only 'src/**' -o ./target/covdir.json
- name: Generate coverage report
Expand Down

0 comments on commit 7c19e56

Please sign in to comment.