Skip to content

Commit

Permalink
[GHA] Add API breaking check (#2763)
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 authored Jul 4, 2024
1 parent 304a238 commit 9d5d0b6
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions .github/workflows/pull_requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ 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:
unit-tests:
name: Unit tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -23,9 +24,27 @@ 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:
name: API breakage checks
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 9d5d0b6

Please sign in to comment.