fix(rpc)!: use consistent chain-state snapshots in getblock, getblockheader, gettxout #46
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
| # Blocks a pull request that breaks a published crate's public Rust API unless the break is | |
| # declared with a conventional-commit `!` in the PR title. | |
| # | |
| # Adding a field to a struct that callers construct, or a variant to an exhaustive enum, is a | |
| # breaking change even though it only adds to the API. cargo-semver-checks applies these SemVer | |
| # rules. The `!` marker is the author's acknowledgement and the signal release-plz uses to bump | |
| # the major version, so one declaration drives both the gate and the release. | |
| name: Semver Checks | |
| on: | |
| # `edited` re-runs the gate when a title gains or loses the `!` marker without a new commit. | |
| pull_request: | |
| types: [opened, synchronize, reopened, edited] | |
| branches: [main] | |
| push: | |
| branches: [main] | |
| merge_group: | |
| # Ensures that only one workflow task will run at a time. Previous builds, if | |
| # already in process, will get cancelled. Only the latest commit will be allowed | |
| # to run, cancelling any workflows in between | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| # dorny/paths-filter reads the changed-file list from the pull request API. | |
| pull-requests: read | |
| env: | |
| CLICOLOR: 1 | |
| jobs: | |
| changes: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| outputs: | |
| semver: ${{ steps.filter.outputs.semver || 'true' }} | |
| breaking: ${{ steps.title.outputs.breaking }} | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| if: github.event_name == 'pull_request' | |
| with: | |
| persist-credentials: false | |
| - uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1 | |
| id: filter | |
| if: github.event_name == 'pull_request' | |
| with: | |
| filters: .github/path-filters.yml | |
| - name: Read the breaking-change marker from the PR title | |
| id: title | |
| if: github.event_name == 'pull_request' | |
| env: | |
| PR_TITLE: ${{ github.event.pull_request.title }} | |
| run: | | |
| breaking_marker='^[a-z]+(\([^)]*\))?!:' | |
| if [[ "$PR_TITLE" =~ $breaking_marker ]]; then | |
| echo "breaking=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "breaking=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| semver-checks: | |
| needs: changes | |
| # Real work runs only on pull requests that change Rust and do not already declare a break | |
| # with `!`. A declared break is allowed through; release-plz majors the version at release. | |
| # On push/merge_group the job is skipped and semver-checks-result skip-passes, so the merge | |
| # queue is not stalled. | |
| if: github.event_name == 'pull_request' && needs.changes.outputs.semver == 'true' && needs.changes.outputs.breaking == 'false' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| # Check out the PR head, not the merge commit, so the API delta is the PR's own. | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Compute the baseline from the PR's fork point | |
| id: baseline | |
| env: | |
| BASE_REF: ${{ github.base_ref }} | |
| run: | | |
| git fetch --no-tags origin "$BASE_REF" | |
| echo "rev=$(git merge-base FETCH_HEAD HEAD)" >> "$GITHUB_OUTPUT" | |
| - uses: ./.github/actions/setup-zebra-build | |
| - uses: obi1kenobi/cargo-semver-checks-action@6b69fcf40e9b5fb17adeb57e4b6ecd020649a239 # v2.9 | |
| with: | |
| # Gate the consumer-facing library crates only. zebrad is a binary whose build script | |
| # needs test-only protos absent from the baseline; zebra-test and zebra-utils are test | |
| # and tooling crates whose feature-gated APIs are not stability surfaces. | |
| exclude: zebrad, zebra-test, zebra-utils | |
| feature-group: default-features | |
| baseline-rev: ${{ steps.baseline.outputs.rev }} | |
| semver-checks-result: | |
| runs-on: ubuntu-latest | |
| if: always() | |
| needs: [changes, semver-checks] | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Decide whether the needed jobs succeeded or failed | |
| uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2 | |
| with: | |
| jobs: ${{ toJSON(needs) }} | |
| allowed-skips: semver-checks |