mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-22 16:23:57 +01:00
95f52d6e39
Not tested.
50 lines
1.4 KiB
YAML
50 lines
1.4 KiB
YAML
name: ci
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
test:
|
|
name: nix flake check --all-systems
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: cachix/install-nix-action@v27
|
|
with:
|
|
extra_nix_config: "extra-platforms = aarch64-linux"
|
|
- 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"
|
|
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
|
|
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
|