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
3 changes: 3 additions & 0 deletions .github/workflows/binance-account-facts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ jobs:
ref: ${{ vars.BINANCE_ACCOUNT_FACTS_READER_REVISION }}
persist-credentials: false

- name: Set up uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9

- name: Verify trusted checkout and exact Runtime source
id: preflight
shell: bash
Expand Down
12 changes: 12 additions & 0 deletions tests/test_binance_account_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,18 @@ def test_source_binding_hash_uses_canonical_json():

def test_workflow_uses_fixed_protected_reader_revision_not_trigger_sha():
workflow = (Path(__file__).parents[1] / ".github" / "workflows" / "binance-account-facts.yml").read_text()
checkout = workflow.index(" - name: Checkout trusted default-branch reader source")
setup_uv = workflow.index(" - name: Set up uv")
preflight = workflow.index(" - name: Verify trusted checkout and exact Runtime source")
install = workflow.index("uv sync --frozen --no-dev")

assert checkout < setup_uv < preflight < install
setup_uv_step = workflow[setup_uv:preflight]
assert "uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9" in setup_uv_step
assert "with:" not in setup_uv_step
assert "secrets." not in setup_uv_step
assert workflow.count("astral-sh/setup-uv@") == 1

assert "ref: ${{ vars.BINANCE_ACCOUNT_FACTS_READER_REVISION }}" in workflow
assert 'BINANCE_ACCOUNT_FACTS_READER_REVISION: ${{ vars.BINANCE_ACCOUNT_FACTS_READER_REVISION || \'\' }}' in workflow
assert "READER_PUBLIC_REVISION: ${{ vars.BINANCE_ACCOUNT_FACTS_READER_REVISION || '' }}" in workflow
Expand Down
Loading