Merge pull request #71 from IntentProof/add-source-ref #256
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ci | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| build-test: | |
| name: "IntentProof CI: Build and Test" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Checkout intentproof-tools (SPEC_REF source) | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: IntentProof/intentproof-tools | |
| ref: main | |
| path: intentproof-tools | |
| - name: Read pinned spec ref | |
| id: spec_ref | |
| run: | | |
| ref="$(tr -d '[:space:]' < intentproof-tools/SPEC_REF)" | |
| if ! echo "$ref" | grep -qE '^[0-9a-f]{40}$'; then | |
| echo "Invalid SPEC_REF in intentproof-tools: '$ref'" >&2 | |
| exit 1 | |
| fi | |
| echo "ref=$ref" >> "$GITHUB_OUTPUT" | |
| - name: Checkout intentproof-spec at pinned ref | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: IntentProof/intentproof-spec | |
| ref: ${{ steps.spec_ref.outputs.ref }} | |
| path: intentproof-spec | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: pip install -e ".[dev]" | |
| - name: Verify sdk-signing fixtures match pinned spec | |
| env: | |
| INTENTPROOF_SPEC_DIR: intentproof-spec | |
| run: bash scripts/check-sdk-signing-fixtures-sync.sh | |
| - name: Run tests | |
| env: | |
| INTENTPROOF_SPEC_DIR: intentproof-spec | |
| run: python3 -m pytest |