flake-checker/.github/workflows/ci.yaml

75 lines
2.2 KiB
YAML
Raw Normal View History

name: Flake checker CI
2023-05-19 18:35:59 +03:00
on:
pull_request:
push:
branches: [main]
jobs:
2023-06-22 21:44:11 +03:00
checks:
name: Nix and Rust checks
2023-05-26 15:29:43 +03:00
runs-on: ubuntu-22.04
steps:
2024-05-16 17:33:45 +03:00
- uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
2023-06-22 21:44:11 +03:00
- name: Check flake.lock
uses: DeterminateSystems/flake-checker-action@main
2023-06-22 21:44:11 +03:00
with:
fail-mode: true
2023-05-26 15:29:43 +03:00
- name: Check Nix formatting
run: nix develop -c check-nixpkgs-fmt
- name: Check Rust formatting
run: nix develop -c check-rustfmt
2023-06-21 20:19:21 +03:00
- name: Clippy
run: nix develop -c cargo clippy
2023-05-26 15:29:43 +03:00
2023-06-21 20:08:25 +03:00
rust-tests:
name: Test Rust
runs-on: ubuntu-22.04
steps:
2024-05-16 17:33:45 +03:00
- uses: actions/checkout@v4
2023-06-21 20:08:25 +03:00
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
2023-06-21 20:08:25 +03:00
- name: cargo test
run: nix develop -c cargo test
check-flake-dirty:
2023-05-24 00:35:05 +03:00
name: Check flake.lock test (dirty 😈)
2023-05-19 18:35:59 +03:00
runs-on: ubuntu-22.04
steps:
2024-05-16 17:33:45 +03:00
- uses: actions/checkout@v4
2023-05-19 18:35:59 +03:00
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Check flake.lock
run: |
2023-06-21 20:08:25 +03:00
nix develop -c cargo run -- ./tests/flake.dirty.0.lock
2023-05-25 19:03:01 +03:00
check-flake-clean:
2023-05-24 00:35:05 +03:00
name: Check flake.lock test (clean 👼)
runs-on: ubuntu-22.04
steps:
2024-05-16 17:33:45 +03:00
- uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Check flake.lock
run: |
2023-05-25 05:20:00 +03:00
nix develop -c cargo run
2023-06-13 19:32:57 +03:00
check-flake-dirty-fail-mode:
name: Check flake.lock test (dirty 😈 plus fail mode activated)
runs-on: ubuntu-22.04
if: false
2023-06-13 19:32:57 +03:00
steps:
2024-05-16 17:33:45 +03:00
- uses: actions/checkout@v4
2023-06-13 19:32:57 +03:00
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
2023-06-13 19:32:57 +03:00
- name: Check flake.lock
run: |
2023-06-21 20:08:25 +03:00
nix develop -c cargo run -- --fail-mode ./tests/flake.dirty.0.lock