Files
pdtv26/.gitea/workflows/check.yaml
T
dckc 372f6a2b96
check / check (push) Canceled after 0s
ci: nix flake check on every push
ir-pico's doctests and speech's unit tests, in the nixos/nix image,
pinned by digest. The checkout is plain git, since actions/checkout
needs node and the image has none.

Generated-by: Claude Opus 5.5
2026-12-02 15:30:58 -06:00

36 lines
1.2 KiB
YAML

name: check
# nix flake check: ir-pico's doctests and speech's unit tests (checks in flake.nix).
on:
push:
pull_request:
jobs:
check:
runs-on: ubuntu-latest
# Nix comes from its own image, pinned by digest, not a floating tag: a tag can be moved.
container:
image: nixos/nix:2.35.6@sha256:b49cb33f3a7e5cf3933ad8774529de0e3807ec5cf54987aa7ccdfb49f2fc55ed
env:
# A container can't make the namespaces Nix's build sandbox needs.
NIX_CONFIG: |
experimental-features = nix-command flakes
sandbox = false
steps:
# No actions/checkout: it runs on node, which this image doesn't have, and git does the job.
- name: Check out
env:
SERVER: ${{ gitea.server_url }}
REPO: ${{ gitea.repository }}
REF: ${{ gitea.ref }}
SHA: ${{ gitea.sha }}
# The server won't hand out a bare commit, so fetch the ref that was pushed, then the commit.
run: |
git init -q src
git -C src fetch -q --depth 20 "$SERVER/$REPO.git" "$REF"
git -C src checkout -q --detach "$SHA"
- name: nix flake check
working-directory: src
run: nix flake check -L