Skip to content

Commit

Permalink
Merge pull request thvdveld#6 from thvdveld/coverage
Browse files Browse the repository at this point in the history
Coverage with codecov.io
  • Loading branch information
thvdveld authored Mar 8, 2024
2 parents 4ef2834 + 0b8a57b commit 1647135
Showing 1 changed file with 41 additions and 15 deletions.
56 changes: 41 additions & 15 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,60 @@ env:
CARGO_TERM_COLOR: always

jobs:
build:
cargo-deny:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: EmbarkStudios/cargo-deny-action@v1

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Miri
run: |
rustup toolchain install nightly --component miri
cargo +nightly miri setup
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Run Miri on sync
run: cargo +nightly miri test -p dot15d4
- name: Format
run: cargo fmt --check --verbose


clippy:
needs: [build]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Lints
- name: Clippy
run: cargo clippy --all-features --all-targets
- name: Fmt
run: cargo fmt --check --verbose

cargo-deny:
tests:
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: EmbarkStudios/cargo-deny-action@v1
- name: Install Miri
run: |
rustup toolchain install nightly --component miri
cargo +nightly miri setup
- name: Tests
run: cargo test --verbose
- name: Miri
run: cargo +nightly miri test --verbose

coverage:
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install `llvm-cov`
uses: taiki-e/install-action@cargo-llvm-cov
- name: Coverage
run: |
cargo llvm-cov --no-report
cargo llvm-cov report --lcov --output-path lcov.info
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
fail_ci_if_error: false
slug: thvdveld/dot15d4

0 comments on commit 1647135

Please sign in to comment.