name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Check
run: nix develop --command cargo check --workspace
- name: Clippy
run: nix develop --command cargo clippy --workspace -- -D warnings
- name: Format
run: nix develop --command cargo fmt --all -- --check
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Test
run: nix develop --command cargo test --workspace
- name: Derive tests
run: nix develop --command cargo test -p packr-abi --features derive