From 029725499c918878a6d4c0dfa5edc26a5c7cb84a Mon Sep 17 00:00:00 2001 From: oqyude Date: Fri, 23 Oct 2026 12:56:47 +0300 Subject: [PATCH] fix(ci): move the checks workflow to .gitea/workflows and let it fail (T39c) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- .gitea/workflows/nix-checks.yml | 43 ++++++++++++++++++++++++++++++++ .github/workflows/nix-checks.yml | 28 --------------------- 2 files changed, 43 insertions(+), 28 deletions(-) create mode 100644 .gitea/workflows/nix-checks.yml delete mode 100644 .github/workflows/nix-checks.yml diff --git a/.gitea/workflows/nix-checks.yml b/.gitea/workflows/nix-checks.yml new file mode 100644 index 0000000..3fbce35 --- /dev/null +++ b/.gitea/workflows/nix-checks.yml @@ -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 diff --git a/.github/workflows/nix-checks.yml b/.github/workflows/nix-checks.yml deleted file mode 100644 index d17a3cb..0000000 --- a/.github/workflows/nix-checks.yml +++ /dev/null @@ -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