CI: add check action

This commit is contained in:
raf 2023-11-03 12:36:30 +03:00
parent 65f49835f6
commit c5a6662b2d
No known key found for this signature in database
GPG key ID: 02D1DD3FA08B6B29
2 changed files with 22 additions and 1 deletions

View file

@ -1,6 +1,7 @@
name: Build
on:
workflow_dispatch:
workflow_call:
secrets:
CACHIX_AUTH_TOKEN:
@ -19,5 +20,5 @@ jobs:
uses: ./.github/workflows/nix.yml
with:
command: nix build -L .#${{ matrix.package }}
command: nix build -L .#${{ matrix.package }} -v
secrets: inherit

20
.github/workflows/check.yml vendored Normal file
View file

@ -0,0 +1,20 @@
name: Checks
on: [push, pull_request, workflow_dispatch]
jobs:
check:
strategy:
matrix:
command:
- NIXPKGS_ALLOW_INSECURE=1 nix flake check --accept-flake-config --impure
- nix run nixpkgs#alejandra -- -c . -e ./npins
uses: ./.github/workflows/nix.yml
with:
command: ${{ matrix.command }}
build:
needs: check
uses: ./.github/workflows/build.yml
secrets: inherit