Spaces:
Running
Running
Continuously replay partner receipt action in CI (#52)
Browse filesFiles changed (2)
44 unmodified lines45464748495044 unmodified lines- name: Install test toolingrun: python -m pip install jsonschema==4.26.0 ruff==0.16.1 PyYAML==6.0.3- name: Lintif: matrix.python-version == '3.11'run: ruff check src tests scripts44 unmodified lines45464748495051525354555644 unmodified lines- name: Install test toolingrun: python -m pip install jsonschema==4.26.0 ruff==0.16.1 PyYAML==6.0.3- name: Replay the local hosted-proof receipt actionif: matrix.python-version == '3.11'uses: ./actions/validate-hosted-proof-receiptwith:receipt: schemas/examples/hosted-proof-receipt-v1-success.json- name: Lintif: matrix.python-version == '3.11'run: ruff check src tests scripts
6 unmodified lines78910111225 unmodified lines3839404142436 unmodified linesROOT = Path(__file__).resolve().parents[1]ACTION = ROOT / "actions" / "validate-hosted-proof-receipt" / "action.yml"class HostedProofReceiptActionTests(unittest.TestCase):25 unmodified lines)self.assertNotIn("inputs.receipt", step["run"])if __name__ == "__main__":unittest.main()6 unmodified lines7891011121325 unmodified lines39404142434445464748495051525354555657585960616263646566676 unmodified linesROOT = Path(__file__).resolve().parents[1]ACTION = ROOT / "actions" / "validate-hosted-proof-receipt" / "action.yml"CI_WORKFLOW = ROOT / ".github" / "workflows" / "ci.yml"class HostedProofReceiptActionTests(unittest.TestCase):25 unmodified lines)self.assertNotIn("inputs.receipt", step["run"])def test_ci_replays_the_local_action_with_the_public_success_shape(self) -> None:workflow = yaml.safe_load(CI_WORKFLOW.read_text(encoding="utf-8"))action_steps = [stepfor step in workflow["jobs"]["test-and-package"]["steps"]if step.get("uses") == "./actions/validate-hosted-proof-receipt"]self.assertEqual([{"name": "Replay the local hosted-proof receipt action","if": "matrix.python-version == '3.11'","uses": "./actions/validate-hosted-proof-receipt","with": {"receipt": ("schemas/examples/hosted-proof-receipt-v1-success.json")},}],action_steps,)if __name__ == "__main__":unittest.main()
.github/workflows/ci.yml+6
tests/test_receipt_action.py+24