From d016c90134e02ad8eaef9c02e14f2783218fc2a7 Mon Sep 17 00:00:00 2001 From: Floweynt <50057682+Floweynt@users.noreply.github.com> Date: Thu, 10 Sep 2026 16:45:30 -0500 Subject: [PATCH] try fixing gitea ci: v22 --- .github/workflows/lint.yml | 1 + ci.nix | 1 + ci.py | 5 +++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8b7d1f5..20f4a90 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -31,6 +31,7 @@ jobs: run: nix run -L .#ci -- lint . "$RUNNER_TEMP/findings" - name: report findings + if: always() env: REVIEWDOG_GITEA_API_TOKEN: ${{ secrets.GITEA_TOKEN }} run: nix run -L .#ci -- lint-report "$REPORTER" "$RUNNER_TEMP/findings" diff --git a/ci.nix b/ci.nix index 7bc375b..2a6d0d1 100644 --- a/ci.nix +++ b/ci.nix @@ -3,6 +3,7 @@ # runner's own nix, not a pinned one). pkgs.writers.writePython3Bin "ci" { flakeIgnore = [ "E501" ]; + libraries = [ pkgs.python3Packages.subprocess-tee ]; makeWrapperArgs = [ "--prefix" "PATH" diff --git a/ci.py b/ci.py index 56512ac..c4cdfc3 100644 --- a/ci.py +++ b/ci.py @@ -6,6 +6,7 @@ import json import os import re import subprocess +import subprocess_tee import sys import urllib.request from collections import Counter @@ -17,7 +18,7 @@ def run(*args, **kw): def nix(*args): - return run("nix", "--extra-experimental-features", "nix-command flakes", "-L", *args, check=True, stdout=subprocess.PIPE).stdout + return subprocess_tee.run(("nix", "--extra-experimental-features", "nix-command flakes", "-L", *args), check=True, text=True).stdout def git(*args, check=True): @@ -362,7 +363,7 @@ def lint_report(args): codes = [reviewdog(f"{args.dir}/{name}", flags) for name, flags in LINTERS - if os.path.getsize(f"{args.dir}/{name}") > 0] + if os.path.isfile(f"{args.dir}/{name}") and os.path.getsize(f"{args.dir}/{name}") > 0] sys.exit(1 if any(codes) else 0)