Repository navigation
feat(ci): diff every published API against its last release on release PRs #6477
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
21f1e30
chore(quest): claim quest/m1/api-diff.md
kixelated 01af431
feat(ci): diff every published API against its last release on releas…
kixelated 02aec67
fix(ci): document each side's crates in one build for the Rust API diff
kixelated 6cabefa
Merge remote-tracking branch 'origin/main' into quest/m1/api-diff
kixelated 1d68322
Merge remote-tracking branch 'origin/main' into iterate/api-diff
kixelated 157522e
fix(js): reject a declaration name that stripInternal left undeclared
kixelated e6bfda6
Merge remote-tracking branch 'origin/main' into iterate/api-diff
kixelated 39bc624
Merge remote-tracking branch 'origin/main' into iterate/api-diff
kixelated b47b09c
feat(js): commit each package's API report and diff them on release PRs
kixelated 418efa4
Merge remote-tracking branch 'origin/main' into iterate/api-diff
kixelated 5c64dc1
Merge remote-tracking branch 'origin/main' into iterate/api-diff
kixelated 66979a8
fix(ci): report-only API diff only for this repository's main
kixelated a0e4c8f
Merge remote-tracking branch 'origin/main' into iterate/api-diff
kixelated 5f758b3
fix(ci): strip FFI header comments with GCC, failing loud without it
kixelated 7bf577b
Merge remote-tracking branch 'origin/main' into merge-6477
kixelated c9bcd0e
chore(js): regenerate API reports after merging main
kixelated b10b274
Merge remote-tracking branch 'origin/main' into merge-6477
kixelated eb9992c
chore(js): regenerate the qmux API report after merging main
kixelated 3ba3575
fix(ci): treat a line added inside an existing API declaration as a b…
kixelated 9f6dc09
fix(ci): stop the Rust API diff when a metadata query fails
kixelated 29544f8
Merge remote-tracking branch 'origin/main' into merge-6477
kixelated 00b615f
chore(js): regenerate the hang API report after merging main
kixelated 2147e4e
fix(js): include unexported referenced types in the API reports
kixelated e5f168d
Merge remote-tracking branch 'origin/main' into quest/m1/api-diff
kixelated 8c79596
chore(js): regenerate API reports after merging main
kixelated 6770f61
fix(ci): select api-diff on its own workflow and fence report diffs w…
kixelated File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| name: API diff | ||
|
|
||
| # Diffs every published API against its last release on PRs into `release`. | ||
| # A backport fails on any break, since it must keep the published API. The cut | ||
| # (a PR from `main`) only reports, for the migration audit: release-plz bumps | ||
| # the versions after it lands, so its breaks are expected. | ||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
| workflow_call: | ||
|
|
||
| concurrency: | ||
| group: api-diff-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| diff: | ||
| name: Public API | ||
| runs-on: ubuntu-24.04-arm | ||
| # cargo-semver-checks documents every published crate twice, baseline and current. | ||
| timeout-minutes: 120 | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: ./.github/actions/nix | ||
| - uses: ./.github/actions/rust-cache | ||
| with: | ||
| access-key-id: ${{ secrets.MBX_R2_ACCESS_KEY_ID }} | ||
| secret-access-key: ${{ secrets.MBX_R2_SECRET_ACCESS_KEY }} | ||
| # The JS baseline is the API reports committed on `release`. | ||
| - name: Fetch release | ||
| run: git fetch --no-tags --depth=1 origin +refs/heads/release:refs/remotes/origin/release | ||
| - name: Diff against the last release | ||
| id: diff | ||
| run: | | ||
| mode=(--deny) | ||
| # Only this repository's own `main` is the cut; a fork's `main` is a backport. | ||
| [[ "$HEAD_REF" != main || "$HEAD_REPO" != "$GITHUB_REPOSITORY" ]] || mode=() | ||
| nix develop --command just api-diff "${mode[@]}" | ||
| env: | ||
| HEAD_REF: ${{ github.head_ref }} | ||
| HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }} | ||
| # Lists and downloads the moq-c and moq-ffi release assets. | ||
| GH_TOKEN: ${{ github.token }} | ||
| - name: Keep the report | ||
| if: ${{ !cancelled() && steps.diff.outcome != 'skipped' }} | ||
| uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7 | ||
| with: | ||
| name: api-diff | ||
| path: target/api-diff/ | ||
| retention-days: 30 | ||
| if-no-files-found: error |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.