fix(ci): move the checks workflow to .gitea/workflows and let it fail (T39c)
test-runner / smoke (push) Successful in 0s
nixos flake checks / invariant-checks (push) Canceled after 0s

Two independent reasons why the CI never ran a single check:

1. The workflow lived under .github/workflows/, but the only remote of this
   repo is gitea@git.zeroq.su — there is no GitHub remote, so GitHub Actions
   never saw it. Gitea Actions reads .gitea/workflows/ in preference to
   .github/workflows/, and .gitea/workflows/ already contained
   test-runner.yml, which does not call .ci/checks.sh. The file is moved
   with `git mv` so history follows it.

2. Every step of the job ended in `|| true` and used `--dry-run`, so even
   if it had run, the job could never go red. The `|| true` is dropped:
   the step now fails the job when a host configuration fails to evaluate.
   `--dry-run` is kept on purpose — the value of this step is evaluation,
   not building — and `--no-link` keeps the workspace free of `result`
   symlinks.

Also: the `default` (minimal) configuration was missing from the list and is
now evaluated; epral is evaluated with `nix eval` (cheap, and it is an
aarch64 target that cannot be built on the x86_64 runner); `nix-env -iA` is
replaced by the supported `nix profile install`; a job timeout is added so a
hung evaluation cannot hold the runner.

The check script is invoked through `bash`, so the step no longer depends on
the file mode (see ca450f1 and db3cbd0).

Not pushed.
This commit is contained in:
oqyude committed 2026-10-23 12:56:47 +03:00
1 parent db3cbd023a
commit 029725499c
2 files changed
+43 -28

No files matched your search

+43
View File
@@ -0,0 +1,43 @@
name: nixos flake checks
# Lives under .gitea/workflows/ because the only remote of this repo is
# gitea@git.zeroq.su (no GitHub remote), and Gitea Actions reads
# .gitea/workflows/ in preference to .github/workflows/. The copy that used
# to sit under .github/workflows/ therefore never ran a single step.
# See .agent/tasks/manifest.md T39.
on:
push:
branches: [main, dev, master]
pull_request:
branches: [main, dev, master]
jobs:
invariant-checks:
runs-on: ubuntu-latest
# The evaluation steps below walk every host configuration; a hung
# evaluation must not hold the runner forever.
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: install sops
run: nix profile install nixpkgs#sops
- name: run invariant checks
run: bash .ci/checks.sh
# Every step below must be able to fail the job. The previous
# revision ended each line with `|| true` and used `--dry-run`,
# so the job could never go red. `--dry-run` is kept because the
# point of this step is evaluation, not building; `--no-link` keeps
# the workspace clean of `result` symlinks.
- name: evaluate every host configuration
run: |
nix build --no-link --dry-run .#nixosConfigurations.default.config.system.build.toplevel
nix build --no-link --dry-run .#nixosConfigurations.atoridu.config.system.build.toplevel
nix build --no-link --dry-run .#nixosConfigurations.rydiwo.config.system.build.toplevel
nix build --no-link --dry-run .#nixosConfigurations.otreca.config.system.build.toplevel
nix build --no-link --dry-run .#nixosConfigurations.sapphira.config.system.build.toplevel
nix build --no-link --dry-run .#nixosConfigurations.wsl.config.system.build.toplevel
nix eval --raw .#nixOnDroidConfigurations.epral.config.system.stateVersion
-28
View File
@@ -1,28 +0,0 @@
name: nixos flake checks
on:
push:
branches: [main, dev, master]
pull_request:
branches: [main, dev, master]
jobs:
invariant-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: install sops
run: nix-env -iA nixpkgs.sops
- name: run invariant checks
run: .ci/checks.sh
- name: build all NixOS configurations
run: |
nix build .#nixosConfigurations.atoridu.config.system.build.toplevel --dry-run || true
nix build .#nixosConfigurations.rydiwo.config.system.build.toplevel --dry-run || true
nix build .#nixosConfigurations.otreca.config.system.build.toplevel --dry-run || true
nix build .#nixosConfigurations.sapphira.config.system.build.toplevel --dry-run || true
nix build .#nixosConfigurations.wsl.config.system.build.toplevel --dry-run || true
nix eval .#nixOnDroidConfigurations.epral.config.system.stateVersion || true