2023-06-03 10:48:41 +01:00
|
|
|
name: use nix
|
|
|
|
|
|
|
|
on: push
|
|
|
|
env:
|
|
|
|
DEV_SHELL_NAME: CI
|
2023-06-02 12:22:44 +01:00
|
|
|
jobs:
|
2023-06-03 10:48:41 +01:00
|
|
|
build:
|
2023-08-12 08:30:29 +01:00
|
|
|
runs-on: flakes-action
|
2023-06-03 10:48:41 +01:00
|
|
|
steps:
|
2023-06-27 07:23:21 +01:00
|
|
|
- uses: actions/checkout@v3
|
2023-07-01 10:06:31 +01:00
|
|
|
name: Checkout
|
2024-04-27 12:16:38 +01:00
|
|
|
|
|
|
|
- name: Restore and cache Nix store
|
|
|
|
uses: https://github.com/nix-community/cache-nix-action@v5
|
|
|
|
with:
|
|
|
|
# restore and save a cache using this key
|
|
|
|
primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix') }}
|
|
|
|
# if there's no cache hit, restore a cache by this prefix
|
|
|
|
restore-prefixes-first-match: nix-${{ runner.os }}-
|
|
|
|
# collect garbage until Nix store size (in bytes) is at most this number
|
|
|
|
# before trying to save a new cache
|
|
|
|
gc-max-store-size-linux: 1073741824
|
2023-07-01 10:06:31 +01:00
|
|
|
- name: Metadata
|
2023-06-27 07:23:21 +01:00
|
|
|
run: |
|
2023-08-12 08:30:29 +01:00
|
|
|
nix flake metadata
|
2023-07-01 10:06:31 +01:00
|
|
|
- name: Statix
|
|
|
|
run: |
|
2023-08-12 08:30:29 +01:00
|
|
|
nix develop -c statix check
|
2023-07-01 10:06:31 +01:00
|
|
|
- name: Flake check
|
|
|
|
run: |
|
2024-04-27 10:24:13 +01:00
|
|
|
nix flake check
|