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 .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
packages/npm/ethos-pdf/vendor/ethos-* binary
fixtures/foreign/opendataloader/real/opendataloader-output.json text eol=lf
9 changes: 9 additions & 0 deletions .github/scripts/test_determinism_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@

ROOT = Path(__file__).resolve().parents[2]
WORKFLOW = ROOT / ".github/workflows/determinism.yml"
GIT_ATTRIBUTES = ROOT / ".gitattributes"
REQUIRED_MATRIX_OS = {"macos-14", "ubuntu-latest", "windows-latest"}
PINNED_OPENDATALOADER_FIXTURE_ATTRIBUTE = (
"fixtures/foreign/opendataloader/real/opendataloader-output.json text eol=lf"
)


def workflow_text() -> str:
Expand All @@ -39,6 +43,11 @@ def matrix_os_values(text: str) -> set[str]:


class DeterminismWorkflowTests(unittest.TestCase):
def test_hashed_opendataloader_fixture_is_pinned_to_lf(self) -> None:
attributes = GIT_ATTRIBUTES.read_text(encoding="utf-8").splitlines()

self.assertIn(PINNED_OPENDATALOADER_FIXTURE_ATTRIBUTE, attributes)

def test_matrix_includes_gate_zero_platforms_and_windows_preflight(self) -> None:
self.assertEqual(matrix_os_values(workflow_text()), REQUIRED_MATRIX_OS)

Expand Down
Loading