Skip to content

Commit 39091b5

Browse files
committed
ci: integrate oasdiff to detect breaking API changes
Automatically detect breaking changes in the API by running oasdiff in CI. The build will fail if any breaking changes are detected, ensuring API stability. Reference: https://github.com/Tufin/oasdiff Signed-off-by: Michael Adler <michael.adler@siemens.com>
1 parent c215ed0 commit 39091b5

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/ci.yml

+14
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,19 @@ jobs:
262262
- run: just generate
263263
- run: git diff --exit-code
264264

265+
openapi-check-breaking:
266+
name: API check
267+
runs-on: ubuntu-latest
268+
steps:
269+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
270+
- name: Check for breaking changes in API
271+
id: breaking_changes
272+
uses: oasdiff/oasdiff-action/breaking@v0.0.21
273+
with:
274+
base: https://raw.githubusercontent.com/siemens/wfx/refs/heads/main/spec/wfx.openapiv3.yml
275+
revision: spec/wfx.openapiv3.yml
276+
fail-on: ERR
277+
265278
release:
266279
name: Release
267280
if: startsWith(github.event.ref, 'refs/tags/v')
@@ -280,6 +293,7 @@ jobs:
280293
- lint
281294
- reuse
282295
- generate
296+
- openapi-check-breaking
283297
steps:
284298
- name: Checkout
285299
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

0 commit comments

Comments
 (0)