2024-04-06 11:58:56 +02:00
|
|
|
name: ci
|
2023-07-10 05:48:15 +02:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ master ]
|
|
|
|
|
|
|
|
jobs:
|
2024-04-06 11:58:56 +02:00
|
|
|
test:
|
2024-06-21 05:14:05 +02:00
|
|
|
name: nix flake check --all-systems
|
2023-07-18 16:26:52 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-04-24 14:48:19 +02:00
|
|
|
- uses: actions/checkout@v4
|
2024-06-21 01:23:46 +02:00
|
|
|
- uses: cachix/install-nix-action@v27
|
2024-06-21 02:32:35 +02:00
|
|
|
with:
|
|
|
|
extra_nix_config: "extra-platforms = aarch64-linux"
|
2024-06-21 05:14:05 +02:00
|
|
|
- run: nix flake check --all-systems
|
2024-04-05 22:51:54 +02:00
|
|
|
format:
|
|
|
|
name: nix fmt -- --check **/*.nix
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-04-24 14:48:19 +02:00
|
|
|
- uses: actions/checkout@v4
|
2024-06-21 01:23:46 +02:00
|
|
|
- uses: cachix/install-nix-action@v27
|
2024-04-05 22:51:54 +02:00
|
|
|
- run: nix fmt -- --check **/*.nix
|
2024-04-06 11:52:55 +02:00
|
|
|
example:
|
|
|
|
name: nix flake check ./example
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-04-24 14:48:19 +02:00
|
|
|
- uses: actions/checkout@v4
|
2024-06-21 01:23:46 +02:00
|
|
|
- uses: cachix/install-nix-action@v27
|
2024-06-21 04:39:44 +02:00
|
|
|
- run: cp ./hosts/laptop/hardware-configuration.nix ./example/hardware-configuration.nix
|
2024-04-06 20:39:06 +02:00
|
|
|
- run: git add .
|
2024-04-06 20:28:42 +02:00
|
|
|
- run: nix flake check ./example --no-write-lock-file --override-input nix-config "git+file://$(pwd | sed -e 's/\s/%20/g')?shallow=1"
|
2024-08-03 18:29:52 +02:00
|
|
|
statix:
|
|
|
|
name: statix check
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: cachix/install-nix-action@v27
|
|
|
|
- run: nix run nixpkgs#statix check
|
2024-08-03 18:30:21 +02:00
|
|
|
nixd:
|
|
|
|
name: nixf-tidy
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: cachix/install-nix-action@v27
|
|
|
|
- run: nix profile install github:nix-community/nixd#nixd
|
|
|
|
- uses: inclyc/nixf-tidy-action@v1
|