Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/stale-conflicts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
steps:
- env:
GH_TOKEN: ${{ github.token }}
shell: bash
run: |
gh pr list -R "$GITHUB_REPOSITORY" --label stale -L 1000 --json number,labels \
--jq '.[] | select(all(.labels[]; .name != "needs rebase")) | .number' |
Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,8 @@ if(BUILD_TESTING)
add_test(NAME pad_input COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/tools/tests/test_pad_input.py)
set_tests_properties(pad_input PROPERTIES TIMEOUT 20)
add_test(NAME stale_conflicts_workflow COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/tools/tests/test_stale_conflicts_workflow.py)
add_test(NAME pad_timeline COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/tools/tests/test_pad_timeline.py)
set_tests_properties(pad_timeline PROPERTIES TIMEOUT 20)
Expand Down
16 changes: 16 additions & 0 deletions tools/tests/test_stale_conflicts_workflow.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
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()
Loading