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

33 lines
874 B
YAML
Raw Normal View History

name: ci
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
name: nix flake check
2023-07-18 16:26:52 +02:00
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v22
- run: nix flake check
format:
name: nix fmt -- --check **/*.nix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v22
- run: nix fmt -- --check **/*.nix
example:
name: nix flake check ./example
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v22
- run: cp ./hardware/laptop.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"