Skip to content

Commit 77874c1

Browse files
authored
Merge pull request #3064 from ahoppen/trigger-testing-ready-for-review
Trigger PR testing when PR opened by GitHub Actions is marked as ready for review
2 parents 3a45155 + aa38d0e commit 77874c1

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/pull_request.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Pull request
22

33
on:
44
pull_request:
5-
types: [opened, reopened, synchronize]
5+
types: [opened, reopened, synchronize, ready_for_review]
66

77
concurrency:
88
group: ${{ github.workflow }}-${{ github.ref }}
@@ -11,15 +11,20 @@ concurrency:
1111
jobs:
1212
tests:
1313
name: Test
14+
# PRs created by GitHub Actions don't kick off further actions (https://github.com/peter-evans/create-pull-request/blob/d57e551ebc1a16dee0b8c9ea6d24dba7627a6e35/docs/concepts-guidelines.md#triggering-further-workflow-runs).
15+
# As a workaround, we mark automerge PRs that are created by GitHub actions as draft and trigger the GitHub actions by marking the PR as ready for review. But we don't want to re-trigger testing this when a normal user's PR is marked as ready for review.
16+
if: (github.event.action != 'ready_for_review') || (github.event.action == 'ready_for_review' && github.event.pull_request.user.login == 'github-actions[bot]')
1417
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main
1518
soundness:
1619
name: Soundness
20+
if: (github.event.action != 'ready_for_review') || (github.event.action == 'ready_for_review' && github.event.pull_request.user.login == 'github-actions[bot]')
1721
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main
1822
with:
1923
api_breakage_check_enabled: false # https://github.com/swiftlang/swift-syntax/issues/3010
2024
docs_check_additional_arguments: "--disable-parameters-and-returns-validation"
2125
verify_source_code:
2226
name: Validate generated code
27+
if: (github.event.action != 'ready_for_review') || (github.event.action == 'ready_for_review' && github.event.pull_request.user.login == 'github-actions[bot]')
2328
runs-on: ubuntu-latest
2429
container:
2530
image: swift:latest
@@ -32,6 +37,7 @@ jobs:
3237
run: "./swift-syntax-dev-utils verify-source-code --toolchain /usr"
3338
test_using_swift_syntax_dev_utils_linux:
3439
name: Run tests using swift-syntax-dev-utils (Linux)
40+
if: (github.event.action != 'ready_for_review') || (github.event.action == 'ready_for_review' && github.event.pull_request.user.login == 'github-actions[bot]')
3541
runs-on: ubuntu-latest
3642
container:
3743
image: swift:latest
@@ -44,6 +50,7 @@ jobs:
4450
run: "./swift-syntax-dev-utils test --enable-rawsyntax-validation --enable-test-fuzzing --toolchain /usr"
4551
test_using_swift_syntax_dev_utils_windows:
4652
name: Run tests using swift-syntax-dev-utils (Windows)
53+
if: (github.event.action != 'ready_for_review') || (github.event.action == 'ready_for_review' && github.event.pull_request.user.login == 'github-actions[bot]')
4754
runs-on: windows-2022
4855
steps:
4956
- name: Pull Docker image

0 commit comments

Comments
 (0)