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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v4
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "22"
- name: Listener and engine parse
Expand Down
21 changes: 21 additions & 0 deletions tests/test_workflow_pins.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from pathlib import Path
import re
import unittest


class WorkflowPinTests(unittest.TestCase):
def test_setup_node_is_immutable_and_node24_compatible(self):
workflow_path = Path(__file__).parents[1] / ".github" / "workflows" / "ci.yml"
if not workflow_path.exists():
self.skipTest("repository workflow is not part of the packaged artifact")
workflow = workflow_path.read_text(encoding="utf-8")
matches = re.findall(r"actions/setup-node@([^\s#]+)", workflow)
self.assertEqual(matches, ["820762786026740c76f36085b0efc47a31fe5020"])
self.assertIn(
"actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0",
workflow,
)


if __name__ == "__main__":
unittest.main()