Skip to content

github: add magic Nix workflow #368

github: add magic Nix workflow

github: add magic Nix workflow #368

Workflow file for this run

name: basic nix checks
on: [pull_request]
jobs:
instantiate:
name: nix-instantiate
runs-on: ubuntu-latest
steps:
- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: actions/checkout@v3
- run: nix-instantiate release.nix -A qchem
# Check if the flake is sane
check:
name: nix flake check
runs-on: ubuntu-latest
steps:
- uses: cachix/install-nix-action@v20
- uses: actions/checkout@v3
- run: nix flake check --accept-flake-config --no-build
statix:
name: statix code check
runs-on: ubuntu-latest
steps:
- uses: cachix/install-nix-action@v20
- uses: actions/checkout@v3
- name: get changed files
id: changed-files
uses: tj-actions/changed-files@v35
- run: |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
nix run nixpkgs#statix -- check $file
done