diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 081600e..e879201 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,40 +15,29 @@ jobs: runs-on: ubuntu-latest steps: - name: Install toolchain with rustfmt - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@stable with: - toolchain: stable components: rustfmt - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Run rustfmt run: cargo fmt --all -- --check - audit: - name: Job audit - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: Run audit - uses: actions-rs/audit-check@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - clippy: name: Job clippy needs: rustfmt runs-on: ubuntu-latest steps: - name: Install toolchain with clippy - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@stable with: - toolchain: stable components: clippy - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Run clippy - uses: actions-rs/clippy-check@v1 + uses: giraffate/clippy-action@v1 with: - token: ${{ secrets.GITHUB_TOKEN }} - args: -- --deny warnings -A clippy::unknown-clippy-lints + reporter: 'github-pr-check' + github_token: ${{ secrets.GITHUB_TOKEN }} + clippy_flags: --deny warnings -A clippy::unknown-clippy-lints tests: name: Job tests @@ -60,15 +49,12 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Install toolchain ${{ matrix.rust_channel }} on ${{ matrix.os }} - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust_channel }} - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Run cargo test - uses: actions-rs/cargo@v1 - with: - command: test - args: --all-features + run: cargo test --no-default-features --features "${{ matrix.features }}" code-coverage: name: Job code coverage @@ -76,23 +62,16 @@ jobs: runs-on: ubuntu-latest steps: - name: Intall toolchain nightly on ubuntu-latest - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly - override: true - - uses: actions/checkout@v2 - - name: Run cargo test - uses: actions-rs/cargo@v1 + uses: dtolnay/rust-toolchain@stable with: - command: test - args: --all-features - env: - CARGO_INCREMENTAL: '0' - 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 grcov - uses: actions-rs/grcov@v0.1 - - name: Upload coverage - uses: codecov/codecov-action@v1 + components: llvm-tools-preview + - uses: actions/checkout@v4 + - name: cargo install cargo-llvm-cov + uses: taiki-e/install-action@cargo-llvm-cov + - name: cargo llvm-cov + run: cargo llvm-cov --all-features --lcov --output-path lcov.info + - name: Upload to codecov.io + uses: codecov/codecov-action@v4 with: - file: ${{ steps.coverage.outputs.report }} + token: ${{ secrets.CODECOV_TOKEN }} + env_vars: OS,RUST