Files
AnyPS5/tools/tests/test_stale_conflicts_workflow.py
T
MarcZX10 e09eb54933 test(ci): require the stale label cleanup step to run with pipefail
The test reads the step that runs gh pr list in stale-conflicts.yml and checks that it sets shell: bash. Against the previous step it fails.
2026-10-31 22:42:41 +00:00

17 lines
500 B
Python

import unittest
from pathlib import Path
WORKFLOW = Path(__file__).resolve().parents[2] / ".github/workflows/stale-conflicts.yml"
class StaleLabelStepTests(unittest.TestCase):
def test_label_cleanup_step_runs_with_pipefail(self):
text = WORKFLOW.read_text(encoding="utf-8")
step = text.split(" - env:", 1)[1].split(" - uses:", 1)[0]
self.assertIn("gh pr list", step)
self.assertIn("shell: bash", step)
if __name__ == "__main__":
unittest.main()