Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,36 @@ jobs:
run: |
if grep -n "Disabling" test.log; then exit 1; fi

apidiff:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: actions/setup-go@v7
with:
go-version: stable
- name: Export the v1.4.0 API under the fork's module path
# The export is written and read in this same job, with one toolchain,
# because export data is bound to the Go version that produced it.
run: |
git worktree add "${{ runner.temp }}/v1.4.0" v1.4.0
cd "${{ runner.temp }}/v1.4.0"
sed -i 's#github.com/jmoiron/sqlx#github.com/secondwindoss/sqlx#g' go.mod $(git ls-files '*.go')
go run golang.org/x/exp/cmd/apidiff@v0.0.0-20261009195045-ca0d7ba23607 -m -w "${{ runner.temp }}/v1.4.0.export" github.com/secondwindoss/sqlx
- name: Fail on any incompatible change since v1.4.0
run: |
out="$(go run golang.org/x/exp/cmd/apidiff@v0.0.0-20261009195045-ca0d7ba23607 -m -incompatible "${{ runner.temp }}/v1.4.0.export" github.com/secondwindoss/sqlx)"
if [ -n "$out" ]; then echo "$out"; exit 1; fi
go run golang.org/x/exp/cmd/apidiff@v0.0.0-20261009195045-ca0d7ba23607 -m "${{ runner.temp }}/v1.4.0.export" github.com/secondwindoss/sqlx

ci-ok:
if: always()
needs:
- lint
- test
- apidiff
runs-on: ubuntu-latest
steps:
- name: Check required jobs
Expand Down
Loading