Skip to content

Commit 7bfe774

Browse files
mtfishmanclaude
andauthored
Use early failure instead of job-level skip for fork-PR downstream tests (#53)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 4550e25 commit 7bfe774

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

.github/workflows/IntegrationTest.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,22 @@ jobs:
3838
${{ (inputs.is-fork-pr && (startsWith(inputs.pkg, 'https://') || startsWith(inputs.pkg, 'git@')))
3939
&& format('{0} (fork PR - use /integrationtest to run)', inputs.pkg)
4040
|| inputs.pkg }}
41-
if: >-
42-
(!github.event.pull_request.draft || inputs.run-on-draft) &&
43-
!(inputs.is-fork-pr && (startsWith(inputs.pkg, 'https://') || startsWith(inputs.pkg, 'git@')))
41+
if: "!github.event.pull_request.draft || inputs.run-on-draft"
4442
runs-on: ${{ matrix.os }}
4543
strategy:
4644
fail-fast: false
4745
matrix:
4846
os: [ubuntu-latest]
4947

5048
steps:
49+
- name: "Check if private downstream test should be skipped"
50+
run: |
51+
pkg="${{ inputs.pkg }}"
52+
is_fork="${{ inputs.is-fork-pr }}"
53+
if [[ "$is_fork" == "true" ]] && { [[ "$pkg" == https://* ]] || [[ "$pkg" == git@* ]]; }; then
54+
echo "::error::Private downstream test for ${{ inputs.pkg }} was skipped (PR was made from a fork). A maintainer can run: /integrationtest ${{ inputs.pkg }}"
55+
exit 1
56+
fi
5157
- name: "No downstream packages configured"
5258
if: inputs.pkg == '__none__'
5359
run: echo "No downstream integration tests configured."

0 commit comments

Comments
 (0)