Skip to content

Commit

Permalink
[GHA] Add API breaking check
Browse files Browse the repository at this point in the history
# Motivation

The next GH action pipeline that we need is to add our API breaking change checker.

# Modification

This PR adds an API breaking change job to our pull request workflow.
  • Loading branch information
FranzBusch committed Jul 4, 2024
1 parent 304a238 commit d81f79b
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/pull_requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

## We are cancelling previously triggered workflow runs
concurrency:
group: ${{ github.workflow }}-${{ github.event.ref }}
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand All @@ -23,9 +23,26 @@ jobs:
- image: swiftlang/swift:nightly-main-jammy
container:
image: ${{ matrix.swift.image }}
timeout-minutes: 20
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run tests
run: swift test
timeout-minutes: 20

api-breakage:
runs-on: ubuntu-latest
container:
image: swift:5.10-noble
timeout-minutes: 20
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
# We need to fetch everything otherwise only the head commit will be fetched.
fetch-depth: 0
- name: Mark the workspace as safe
# https://github.com/actions/checkout/issues/766
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Run API breakage check
run: swift package diagnose-api-breaking-changes origin/main

0 comments on commit d81f79b

Please sign in to comment.