File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 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"
You can’t perform that action at this time.
0 commit comments