From 0ce49bcf75a81ba974368b4d398e396b2e4648e0 Mon Sep 17 00:00:00 2001 From: Pigbibi <20649888+Pigbibi@users.noreply.github.com> Date: Fri, 2 Oct 2026 21:10:54 +0800 Subject: [PATCH] fix: install uv in isolated account facts job Co-Authored-By: Codex --- .github/workflows/binance-account-facts.yml | 3 +++ tests/test_binance_account_facts.py | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/.github/workflows/binance-account-facts.yml b/.github/workflows/binance-account-facts.yml index 5b03e650..f6ad64d5 100644 --- a/.github/workflows/binance-account-facts.yml +++ b/.github/workflows/binance-account-facts.yml @@ -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 diff --git a/tests/test_binance_account_facts.py b/tests/test_binance_account_facts.py index d4ad731f..702494ca 100644 --- a/tests/test_binance_account_facts.py +++ b/tests/test_binance_account_facts.py @@ -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