Add SOURCE_REF and CI tuple bookkeeping check #58
Workflow file for this run
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-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - name: Verify SOURCE_REF matches this commit | |
| run: bash scripts/check-source-ref.sh | |
| - name: go build | |
| run: go build ./... | |
| - name: Verify sdk-signing fixtures match pinned spec | |
| env: | |
| INTENTPROOF_SPEC_DIR: intentproof-spec | |
| run: bash scripts/check-sdk-signing-fixtures-sync.sh | |
| - name: go test | |
| env: | |
| INTENTPROOF_SPEC_DIR: intentproof-spec | |
| run: go test -count=1 ./... |