1414 - ready_for_review
1515 branches :
1616 - develop
17+ merge_group :
18+ types :
19+ - checks_requested
20+ branches :
21+ - develop
1722
1823permissions :
1924 contents : read
2025 actions : read
2126
2227concurrency :
23- group : ${{ github.workflow }}-${{ github.head_ref }}
28+ group : ${{ github.workflow }}-${{ github.head_ref || github.ref }}
2429 cancel-in-progress : true
2530
2631jobs :
2732 check :
2833 if : |
2934 !startsWith(github.head_ref, 'release-notes/') &&
30- (github.event.pull_request.draft == false || github.event_name == 'push')
35+ (github.event_name == 'push' ||
36+ github.event_name == 'merge_group' ||
37+ github.event.pull_request.draft == false)
3138 name : Check code quality
3239 runs-on : blacksmith-8vcpu-ubuntu-2404
3340 steps :
5562 test-core :
5663 if : |
5764 !startsWith(github.head_ref, 'release-notes/') &&
58- (github.event.pull_request.draft == false || github.event_name == 'push')
65+ (github.event_name == 'push' ||
66+ github.event_name == 'merge_group' ||
67+ github.event.pull_request.draft == false)
5968 name : Run unit and integration tests
6069 runs-on : blacksmith-8vcpu-ubuntu-2404
6170 steps :
8392 test-e2e :
8493 if : |
8594 !startsWith(github.head_ref, 'release-notes/') &&
86- (github.event.pull_request.draft == false || github.event_name == 'push')
95+ (github.event_name == 'push' ||
96+ github.event_name == 'merge_group' ||
97+ github.event.pull_request.draft == false)
8798 name : Run end-to-end tests (shard ${{ matrix.shard }}/3)
8899 runs-on : blacksmith-8vcpu-ubuntu-2404
89100 strategy :
@@ -100,16 +111,21 @@ jobs:
100111 if : github.event_name == 'pull_request'
101112 uses : nrwl/nx-set-shas@afb73a62d26e41464e9254689e1fd6122ee683c1 # v5.0.1
102113
114+ - name : Set base and head SHAs for merge queue affected
115+ if : github.event_name == 'merge_group'
116+ run : |
117+ echo "NX_BASE=${{ github.event.merge_group.base_sha }}" >> "$GITHUB_ENV"
118+ echo "NX_HEAD=${{ github.event.merge_group.head_sha }}" >> "$GITHUB_ENV"
119+
103120 - name : Setup
104121 uses : ./.github/actions/setup
105122
106- # Detect which e2e suites should run. On PR we honour `nx affected`
107- # (using `NX_BASE`/`NX_HEAD` set by `nx-set-shas` above); on push we run
108- # everything that has a `test:e2e` target.
123+ # Detect which e2e suites should run. On PR and merge queue runs we
124+ # honour `nx affected`; on push we run every `test:e2e` target.
109125 - name : Detect affected e2e projects
110126 id : detect
111127 run : |
112- if [ "${{ github.event_name }}" = "pull_request" ]; then
128+ if [ "${{ github.event_name }}" = "pull_request" ] || [ "${{ github.event_name }}" = "merge_group" ] ; then
113129 affected=$(pnpm exec nx show projects --affected --withTarget test:e2e --json | jq -r '.[]')
114130 else
115131 affected=$(pnpm exec nx show projects --withTarget test:e2e --json | jq -r '.[]')
@@ -184,7 +200,9 @@ jobs:
184200 if : |
185201 always() &&
186202 !startsWith(github.head_ref, 'release-notes/') &&
187- (github.event.pull_request.draft == false || github.event_name == 'push')
203+ (github.event_name == 'push' ||
204+ github.event_name == 'merge_group' ||
205+ github.event.pull_request.draft == false)
188206 name : Run end-to-end tests
189207 needs : test-e2e
190208 runs-on : ubuntu-latest
0 commit comments