Skip to content

Commit 75bb93e

Browse files
committed
Add new api break
1 parent 0dd1f77 commit 75bb93e

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/soundness.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,31 @@ jobs:
3535
- name: Check generated code
3636
run: |
3737
./dev/check-generated-code.sh
38+
39+
check-api-breaks:
40+
name: Check for API breakage
41+
runs-on: ubuntu-latest
42+
container:
43+
image: swift:latest
44+
timeout-minutes: 20
45+
steps:
46+
- name: Checkout repository
47+
uses: actions/checkout@v4
48+
with:
49+
persist-credentials: false
50+
fetch-tags: true
51+
fetch-depth: 0 # Fetching tags requires fetch-depth: 0 (https://github.com/actions/checkout/issues/1471)
52+
- name: Mark the workspace as safe
53+
# https://github.com/actions/checkout/issues/766
54+
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
55+
- name: Run API breakage check
56+
shell: bash
57+
run: |
58+
if [[ -z '${{ inputs.api_breakage_check_baseline }}' ]]; then
59+
git fetch ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} ${GITHUB_BASE_REF}:pull-base-ref
60+
BASELINE_REF='pull-base-ref'
61+
else
62+
BASELINE_REF='${{ inputs.api_breakage_check_baseline }}'
63+
fi
64+
echo "Using baseline: $BASELINE_REF"
65+
env GRPC_SWIFT_PROTOBUF_NO_PLUGIN=1 swift package diagnose-api-breaking-changes "$BASELINE_REF"

0 commit comments

Comments
 (0)