Skip to content
Closed
Show file tree
Hide file tree
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
33 changes: 33 additions & 0 deletions .github/workflows/api_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: API Breakage

permissions:
contents: read

on:
pull_request:
branches: [ main ]

jobs:
api-breakage:
name: Api Breakage Compared to main branch
runs-on: ubuntu-latest
container:
# Test on the latest Swift release. This could run on all the support
# Swift versions, but that doesn't seem worth it until there are Swift
# version specific conditionals to justify it.
image: swift:latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Mark the workspace as safe
# https://github.com/actions/checkout/issues/766
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Check for API breaking changes
# This can flag things related to the generated code for the upstream
# protos (descriptor.proto, etc.), however those should all be OK as they
# are limited plugin, and most of the time everything is hidden within the
# generation api.
run: swift package diagnose-api-breaking-changes origin/main
22 changes: 0 additions & 22 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,28 +63,6 @@ jobs:
if: ${{ matrix.swift.version != '5.10' }}
run: make compile-tests

api-breakage:
name: Api Breakage Compared to main branch
# Only on pull requests
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
container:
# Test on the latest Swift release. This could run on all the support
# Swift versions, but that doesn't seem worth it until there are Swift
# version specific conditionals to justify it.
image: swift:latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Mark the workspace as safe
# https://github.com/actions/checkout/issues/766
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Check for API breaking changes
run: swift package diagnose-api-breaking-changes origin/main --breakage-allowlist-path known_api_breaks.txt

format-check:
name: swift-format Check
# Only on pull requests
Expand Down
1 change: 0 additions & 1 deletion known_api_breaks.txt

This file was deleted.