try fixing gitea ci: v22
This commit is contained in:
@@ -31,6 +31,7 @@ jobs:
|
|||||||
run: nix run -L .#ci -- lint . "$RUNNER_TEMP/findings"
|
run: nix run -L .#ci -- lint . "$RUNNER_TEMP/findings"
|
||||||
|
|
||||||
- name: report findings
|
- name: report findings
|
||||||
|
if: always()
|
||||||
env:
|
env:
|
||||||
REVIEWDOG_GITEA_API_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
REVIEWDOG_GITEA_API_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
run: nix run -L .#ci -- lint-report "$REPORTER" "$RUNNER_TEMP/findings"
|
run: nix run -L .#ci -- lint-report "$REPORTER" "$RUNNER_TEMP/findings"
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
# runner's own nix, not a pinned one).
|
# runner's own nix, not a pinned one).
|
||||||
pkgs.writers.writePython3Bin "ci" {
|
pkgs.writers.writePython3Bin "ci" {
|
||||||
flakeIgnore = [ "E501" ];
|
flakeIgnore = [ "E501" ];
|
||||||
|
libraries = [ pkgs.python3Packages.subprocess-tee ];
|
||||||
makeWrapperArgs = [
|
makeWrapperArgs = [
|
||||||
"--prefix"
|
"--prefix"
|
||||||
"PATH"
|
"PATH"
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import json
|
|||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import subprocess_tee
|
||||||
import sys
|
import sys
|
||||||
import urllib.request
|
import urllib.request
|
||||||
from collections import Counter
|
from collections import Counter
|
||||||
@@ -17,7 +18,7 @@ def run(*args, **kw):
|
|||||||
|
|
||||||
|
|
||||||
def nix(*args):
|
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):
|
def git(*args, check=True):
|
||||||
@@ -362,7 +363,7 @@ def lint_report(args):
|
|||||||
|
|
||||||
codes = [reviewdog(f"{args.dir}/{name}", flags)
|
codes = [reviewdog(f"{args.dir}/{name}", flags)
|
||||||
for name, flags in LINTERS
|
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)
|
sys.exit(1 if any(codes) else 0)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user