Skip to content

test nix

test nix #5

Workflow file for this run

name: Nix CI
on:
push:
pull_request:
jobs:
check-hashes:
name: Ensure Nix Hashes are up-to-date
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install nix
uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-unstable
# - uses: cachix/cachix-action@v12
# with:
# name: trawelling
# authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Update generated files
run: nix develop --impure .#ci --command "update-nix-package-deps"
- name: Check if up-to-date
shell: bash
run: |
if [ "$(git status --porcelain=v1 2>/dev/null | wc -l)" = "1" ]; then
git status
echo "Nix hashes are not up to date. Update them with the `update-nix-package-dep` command in the nix devshell. or run `/nix-update`"
exit 1
fi
build:
name: Build Package
runs-on: ubuntu-latest
needs:
- check-hashes
steps:
- uses: actions/checkout@v3
- name: Install nix
uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-unstable
# - uses: cachix/cachix-action@v12
# with:
# name: trawelling
# authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Build with nix
run: nix build