Merge pull request #87 from blip-radar/dependabot/cargo/encoding_rs-0… #230
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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- '*' | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
# Run cargo test | |
test: | |
name: Test Suite | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Cache | |
uses: actions/cache@v4 | |
with: | |
save-always: true | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.toml') }} | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@v14 | |
- uses: DeterminateSystems/magic-nix-cache-action@v8 | |
- name: Run cargo test | |
run: nix develop --command cargo tarpaulin --verbose --all-features --workspace --timeout 120 --out xml | |
- uses: k1LoW/octocov-action@v1 | |
# Run cargo clippy -- -D warnings | |
clippy_check: | |
name: Clippy | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Cache | |
uses: actions/cache@v4 | |
with: | |
save-always: true | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.toml') }} | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@v14 | |
- uses: DeterminateSystems/magic-nix-cache-action@v8 | |
- name: Run clippy | |
run: nix develop --command cargo clippy -- -D warnings | |
# FIXME: remove when clippy warnings are fixed | |
continue-on-error: true | |
# Run cargo fmt --all -- --check | |
format: | |
name: Format | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@v14 | |
- uses: DeterminateSystems/magic-nix-cache-action@v8 | |
- name: Run cargo fmt | |
run: nix develop --command cargo fmt --all -- --check |