2023-05-24 00:06:22 +03:00
|
|
|
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
|
2023-07-14 12:16:53 +03:00
|
|
|
- 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
|
2023-07-14 12:16:53 +03:00
|
|
|
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
|
2023-07-14 12:16:53 +03:00
|
|
|
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
|
|
|
|
|
2023-05-24 00:06:22 +03:00
|
|
|
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
|
2023-07-14 12:16:53 +03:00
|
|
|
uses: DeterminateSystems/nix-installer-action@main
|
|
|
|
- uses: DeterminateSystems/magic-nix-cache-action@main
|
2023-05-22 19:32:14 +03:00
|
|
|
- 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
|
|
|
|
2023-05-24 00:06:22 +03:00
|
|
|
check-flake-clean:
|
2023-05-24 00:35:05 +03:00
|
|
|
name: Check flake.lock test (clean 👼)
|
2023-05-24 00:06:22 +03:00
|
|
|
runs-on: ubuntu-22.04
|
|
|
|
steps:
|
2024-05-16 17:33:45 +03:00
|
|
|
- uses: actions/checkout@v4
|
2023-05-24 00:06:22 +03:00
|
|
|
- name: Install Nix
|
2023-07-14 12:16:53 +03:00
|
|
|
uses: DeterminateSystems/nix-installer-action@main
|
|
|
|
- uses: DeterminateSystems/magic-nix-cache-action@main
|
2023-05-24 00:06:22 +03:00
|
|
|
- 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
|
2023-06-13 19:40:54 +03:00
|
|
|
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
|
2023-07-14 12:16:53 +03:00
|
|
|
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
|