feat: better error handling #59
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: | |
- main | |
env: | |
CARGO_TERM_COLOR: always | |
NIX_DEV: nix develop --command | |
CARGO_FLAGS: --all-targets --all-features | |
jobs: | |
rustfmt: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@v14 | |
- name: Cache Nix store | |
uses: DeterminateSystems/magic-nix-cache-action@v8 | |
- name: Run rustfmt | |
run: $NIX_DEV cargo fmt --all -- --check | |
clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@v14 | |
- name: Cache Nix store | |
uses: DeterminateSystems/magic-nix-cache-action@v8 | |
- name: Run clippy | |
run: $NIX_DEV cargo clippy --workspace $CARGO_FLAGS -- -D warnings | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@v14 | |
- name: Cache Nix store | |
uses: DeterminateSystems/magic-nix-cache-action@v8 | |
- name: Build | |
run: $NIX_DEV cargo build $CARGO_FLAGS | |
- name: Run tests | |
run: $NIX_DEV cargo test $CARGO_FLAGS |