fix(ci): make publication checks runner-safe

This commit is contained in:
yeasy
2026-07-11 06:44:12 -07:00
parent 44822cea16
commit 2ef6d80d4f
2 changed files with 4 additions and 3 deletions
-1
View File
@@ -96,7 +96,6 @@ jobs:
- name: Build HTML reader
env:
CHROME_BIN: ${{ steps.setupchrome.outputs.chrome-path }}
SAFE_TAG_NAME: ${{ steps.tag.outputs.SAFE_TAG_NAME }}
run: |
title=$(python3 -c 'import json; print(json.load(open("book.json", encoding="utf-8"))["title"])')
+4 -2
View File
@@ -114,7 +114,8 @@ class ExampleValidationTests(unittest.TestCase):
self.assertIn("tools/test_examples.py --require-tools", text)
def test_local_run_reports_skips_when_tools_are_unavailable(self):
result = self.run_runner(path="/usr/bin:/bin")
with tempfile.TemporaryDirectory() as tmp:
result = self.run_runner(path=tmp)
self.assertEqual(result.returncode, 0, result.stdout + result.stderr)
self.assertEqual(result.stdout.count("SKIP"), 4, result.stdout)
@@ -124,7 +125,8 @@ class ExampleValidationTests(unittest.TestCase):
self.assertIn("actionlint", result.stdout)
def test_required_run_fails_when_tools_are_unavailable(self):
result = self.run_runner("--require-tools", path="/usr/bin:/bin")
with tempfile.TemporaryDirectory() as tmp:
result = self.run_runner("--require-tools", path=tmp)
self.assertNotEqual(result.returncode, 0)
self.assertEqual(result.stdout.count("UNAVAILABLE"), 4, result.stdout)