@@ -77,14 +77,16 @@ jobs:
77
77
secrets : inherit
78
78
79
79
check-codestyle-python :
80
- needs : [ check-permissions, build-build-tools-image ]
80
+ needs : [ meta, check-permissions, build-build-tools-image ]
81
+ if : ${{ needs.meta.outputs.run-kind == 'pr' }}
81
82
uses : ./.github/workflows/_check-codestyle-python.yml
82
83
with :
83
84
build-tools-image : ${{ needs.build-build-tools-image.outputs.image }}-bookworm
84
85
secrets : inherit
85
86
86
87
check-codestyle-jsonnet :
87
- needs : [ check-permissions, build-build-tools-image ]
88
+ needs : [ meta, check-permissions, build-build-tools-image ]
89
+ if : ${{ needs.meta.outputs.run-kind == 'pr' }}
88
90
runs-on : [ self-hosted, small ]
89
91
container :
90
92
image : ${{ needs.build-build-tools-image.outputs.image }}
@@ -156,23 +158,25 @@ jobs:
156
158
pass_if_unchanged : true
157
159
158
160
check-codestyle-rust :
159
- needs : [ check-permissions, build-build-tools-image ]
161
+ needs : [ meta, check-permissions, build-build-tools-image ]
162
+ if : ${{ needs.meta.outputs.run-kind == 'pr' }}
160
163
uses : ./.github/workflows/_check-codestyle-rust.yml
161
164
with :
162
165
build-tools-image : ${{ needs.build-build-tools-image.outputs.image }}-bookworm
163
166
archs : ' ["x64", "arm64"]'
164
167
secrets : inherit
165
168
166
169
check-dependencies-rust :
167
- needs : [ files-changed, build-build-tools-image ]
168
- if : ${{ needs.files-changed.outputs.check-rust-dependencies == 'true' }}
170
+ needs : [ meta, files-changed, build-build-tools-image ]
171
+ if : ${{ needs.files-changed.outputs.check-rust-dependencies == 'true' && needs.meta.outputs.run-kind == 'pr' }}
169
172
uses : ./.github/workflows/cargo-deny.yml
170
173
with :
171
174
build-tools-image : ${{ needs.build-build-tools-image.outputs.image }}-bookworm
172
175
secrets : inherit
173
176
174
177
build-and-test-locally :
175
178
needs : [ meta, build-build-tools-image ]
179
+ if : ${{ needs.meta.outputs.run-kind == 'pr' }}
176
180
strategy :
177
181
fail-fast : false
178
182
matrix :
@@ -470,14 +474,20 @@ jobs:
470
474
})
471
475
472
476
trigger-e2e-tests :
473
- # Depends on jobs that can get skipped
477
+ # !failure() && !cancelled() because it depends on jobs that can get skipped
474
478
if : >-
475
479
${{
476
480
(
477
- !github.event.pull_request.draft
478
- || contains( github.event.pull_request.labels.*.name, 'run-e2e-tests-in-draft')
479
- || needs.meta.outputs.run-kind == 'push-main'
480
- ) && !failure() && !cancelled()
481
+ (
482
+ needs.meta.outputs.run-kind == 'pr'
483
+ && (
484
+ !github.event.pull_request.draft
485
+ || contains(github.event.pull_request.labels.*.name, 'run-e2e-tests-in-draft')
486
+ )
487
+ )
488
+ || contains(fromJSON('["push-main", "storage-rc-pr", "proxy-rc-pr", "compute-rc-pr"]'), needs.meta.outputs.run-kind)
489
+ )
490
+ && !failure() && !cancelled()
481
491
}}
482
492
needs : [ check-permissions, push-neon-image-dev, push-compute-image-dev, meta ]
483
493
uses : ./.github/workflows/trigger-e2e-tests.yml
@@ -1388,10 +1398,10 @@ jobs:
1388
1398
if : |
1389
1399
contains(needs.*.result, 'failure')
1390
1400
|| contains(needs.*.result, 'cancelled')
1391
- || (needs.check-dependencies-rust.result == 'skipped' && needs.files-changed.outputs.check-rust-dependencies == 'true')
1392
- || needs.build-and-test-locally.result == 'skipped'
1393
- || needs.check-codestyle-python.result == 'skipped'
1394
- || needs.check-codestyle-rust.result == 'skipped'
1401
+ || (needs.check-dependencies-rust.result == 'skipped' && needs.files-changed.outputs.check-rust-dependencies == 'true' && needs.meta.outputs.run-kind == 'pr' )
1402
+ || ( needs.build-and-test-locally.result == 'skipped' && needs.meta.outputs.run-kind == 'pr')
1403
+ || ( needs.check-codestyle-python.result == 'skipped' && needs.meta.outputs.run-kind == 'pr')
1404
+ || ( needs.check-codestyle-rust.result == 'skipped' && needs.meta.outputs.run-kind == 'pr')
1395
1405
|| needs.files-changed.result == 'skipped'
1396
1406
|| (needs.push-compute-image-dev.result == 'skipped' && contains(fromJSON('["push-main", "pr", "compute-release", "compute-rc-pr"]'), needs.meta.outputs.run-kind))
1397
1407
|| (needs.push-neon-image-dev.result == 'skipped' && contains(fromJSON('["push-main", "pr", "storage-release", "storage-rc-pr", "proxy-release", "proxy-rc-pr"]'), needs.meta.outputs.run-kind))
0 commit comments