Only run cargo deny on PR if Cargo.toml or Cargo.lock were changed (#… #153
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Test | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
workflow_dispatch: | |
permissions: | |
contents: read | |
id-token: write | |
jobs: | |
cargo-test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust_version: ["1.74", "stable"] | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- uses: dtolnay/rust-toolchain@1482605bfc5719782e1267fd0c0cc350fe7646b8 | |
with: | |
toolchain: ${{ matrix.rust_version }} | |
components: llvm-tools-preview | |
- uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab | |
- uses: taiki-e/install-action@a22e1808bbd53573c0b897cc089c64643401af7d | |
with: | |
tool: cargo-llvm-cov | |
- uses: extractions/setup-just@dd310ad5a97d8e7b41793f8ef055398d51ad4de6 | |
- name: Test | |
run: just test | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@015f24e6818733317a2da2edd6290ab26238649a | |
with: | |
name: Rust ${{ matrix.rust_version }} | |
files: lcov.info | |
use_oidc: true | |
fail_ci_if_error: true |