From 202bf64e33f2fad50a8e26ae605e9a5e355273d6 Mon Sep 17 00:00:00 2001 From: mulatta <67085791+mulatta@users.noreply.github.com> Date: Fri, 4 Sep 2026 17:11:58 +0900 Subject: [PATCH 1/2] ci: let nixbot own repository checks Expose formatting, Python validation, tests, and workflow linting as flake checks so branch rules depend on one trusted evaluator instead of duplicate GitHub jobs. --- .github/actionlint.yaml | 1 + .github/workflows/release.yaml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/actionlint.yaml b/.github/actionlint.yaml index 8ee75d5..cf8c6e5 100644 --- a/.github/actionlint.yaml +++ b/.github/actionlint.yaml @@ -1,5 +1,6 @@ self-hosted-runner: labels: - psi + - gpu - trusted-release - container-release diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 2c95848..887362d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -16,7 +16,7 @@ concurrency: jobs: release: - runs-on: [self-hosted, psi, trusted-release, container-release] + runs-on: [self-hosted, psi, gpu, trusted-release, container-release] timeout-minutes: 180 env: BUILDX_BUILDER: release-${{ github.run_id }}-${{ github.run_attempt }} From 4d8017d3520a4c9f54d2295d63413ce53b6e2daf Mon Sep 17 00:00:00 2001 From: mulatta <67085791+mulatta@users.noreply.github.com> Date: Fri, 4 Sep 2026 18:41:01 +0900 Subject: [PATCH 2/2] ci: keep checks within treefmt Avoid maintaining separate Python and workflow check plumbing when repository validation is intentionally limited to existing Treefmt and devshell outputs. --- .github/actionlint.yaml | 6 ----- checks.nix | 52 ----------------------------------------- flake.nix | 14 ++++------- 3 files changed, 4 insertions(+), 68 deletions(-) delete mode 100644 .github/actionlint.yaml delete mode 100644 checks.nix diff --git a/.github/actionlint.yaml b/.github/actionlint.yaml deleted file mode 100644 index cf8c6e5..0000000 --- a/.github/actionlint.yaml +++ /dev/null @@ -1,6 +0,0 @@ -self-hosted-runner: - labels: - - psi - - gpu - - trusted-release - - container-release diff --git a/checks.nix b/checks.nix deleted file mode 100644 index e50ec47..0000000 --- a/checks.nix +++ /dev/null @@ -1,52 +0,0 @@ -{ pkgs }: -let - source = pkgs.lib.cleanSource ./.; -in -{ - python-lint = - pkgs.runCommand "containers-python-lint" - { - nativeBuildInputs = with pkgs; [ - mypy - ruff - ]; - } - '' - cp -r ${source} source - chmod -R u+w source - cd source - ruff check scripts images/*/*.py - mypy scripts images/*/*.py - touch $out - ''; - - python-tests = - pkgs.runCommand "containers-python-tests" - { - nativeBuildInputs = with pkgs; [ - git - python312 - ]; - } - '' - cp -r ${source} source - chmod -R u+w source - cd source - export HOME=$TMPDIR - python -m unittest discover -s scripts -p '*_test.py' - touch $out - ''; - - workflows-lint = - pkgs.runCommand "containers-workflows-lint" - { - nativeBuildInputs = [ pkgs.actionlint ]; - } - '' - cp -r ${source} source - chmod -R u+w source - cd source - actionlint -config-file .github/actionlint.yaml .github/workflows/*.yaml - touch $out - ''; -} diff --git a/flake.nix b/flake.nix index 13c8e17..5d3ab0b 100644 --- a/flake.nix +++ b/flake.nix @@ -40,7 +40,6 @@ deadnix.enable = true; keep-sorted.enable = true; nixfmt.enable = true; - ruff-check.enable = true; ruff-format.enable = true; statix.enable = true; }; @@ -51,19 +50,14 @@ formatter = treefmtEval.config.build.wrapper; formatting = treefmtEval.config.build.check flake; devshell = self.callPackage ./devshell.nix { }; - checks = self.callPackage ./checks.nix { }; }) ); in { - checks = eachSystem ( - system: - scopes.${system}.checks - // { - formatting = scopes.${system}.formatting; - devshell-default = scopes.${system}.devshell; - } - ); + checks = eachSystem (system: { + formatting = scopes.${system}.formatting; + devshell-default = scopes.${system}.devshell; + }); devShells = eachSystem (system: { default = scopes.${system}.devshell;