nix-config/.github/workflows/ci.yml

56 lines
1.6 KiB
YAML
Raw Normal View History

name: ci
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
name: nix build packages/*.nix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
- run: basename -s .nix packages/* | sed 's/.*/.#&/' | xargs nix build
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:
- uses: actions/checkout@v4
- 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
format:
name: nix fmt -- --check **/*.nix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
- run: nix fmt -- --check **/*.nix
example:
name: nix flake check ./example
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
- run: cp ./hosts/laptop/hardware-configuration.nix ./example/hardware-configuration.nix
- run: git add .
- 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
nixd:
name: nixf-tidy --variable-lookup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
- run: nix run .#nixf-tidy