@@ -77,14 +77,17 @@ 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
+ # No need to run on `main` because we this in the merge queue
82
+ if : ${{ needs.meta.outputs.run-kind == 'pr' }}
81
83
uses : ./.github/workflows/_check-codestyle-python.yml
82
84
with :
83
85
build-tools-image : ${{ needs.build-build-tools-image.outputs.image }}-bookworm
84
86
secrets : inherit
85
87
86
88
check-codestyle-jsonnet :
87
- needs : [ check-permissions, build-build-tools-image ]
89
+ needs : [ meta, check-permissions, build-build-tools-image ]
90
+ if : ${{ contains(fromJSON('["pr", "push-main"]'), needs.meta.outputs.run-kind) }}
88
91
runs-on : [ self-hosted, small ]
89
92
container :
90
93
image : ${{ needs.build-build-tools-image.outputs.image }}
@@ -156,29 +159,32 @@ jobs:
156
159
pass_if_unchanged : true
157
160
158
161
check-codestyle-rust :
159
- needs : [ check-permissions, build-build-tools-image ]
162
+ needs : [ meta, check-permissions, build-build-tools-image ]
163
+ # No need to run on `main` because we this in the merge queue
164
+ if : ${{ needs.meta.outputs.run-kind == 'pr' }}
160
165
uses : ./.github/workflows/_check-codestyle-rust.yml
161
166
with :
162
167
build-tools-image : ${{ needs.build-build-tools-image.outputs.image }}-bookworm
163
168
archs : ' ["x64", "arm64"]'
164
169
secrets : inherit
165
170
166
171
check-dependencies-rust :
167
- needs : [ files-changed, build-build-tools-image ]
168
- if : ${{ needs.files-changed.outputs.check-rust-dependencies == 'true' }}
172
+ needs : [ meta, files-changed, build-build-tools-image ]
173
+ if : ${{ needs.files-changed.outputs.check-rust-dependencies == 'true' && needs.meta.outputs.run-kind == 'pr' }}
169
174
uses : ./.github/workflows/cargo-deny.yml
170
175
with :
171
176
build-tools-image : ${{ needs.build-build-tools-image.outputs.image }}-bookworm
172
177
secrets : inherit
173
178
174
179
build-and-test-locally :
175
180
needs : [ meta, build-build-tools-image ]
181
+ if : ${{ contains(fromJSON('["pr", "push-main"]'), needs.meta.outputs.run-kind) }}
176
182
strategy :
177
183
fail-fast : false
178
184
matrix :
179
185
arch : [ x64, arm64 ]
180
186
# Do not build or run tests in debug for release branches
181
- build-type : ${{ fromJson ((startsWith(github.ref_name, 'release') && github.event_name == 'push') && '["release"]' || '["debug", "release"]') }}
187
+ build-type : ${{ fromJSON ((startsWith(github.ref_name, 'release') && github.event_name == 'push') && '["release"]' || '["debug", "release"]') }}
182
188
include :
183
189
- build-type : release
184
190
arch : arm64
@@ -470,14 +476,20 @@ jobs:
470
476
})
471
477
472
478
trigger-e2e-tests :
473
- # Depends on jobs that can get skipped
479
+ # !failure() && !cancelled() because it depends on jobs that can get skipped
474
480
if : >-
475
481
${{
476
482
(
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()
483
+ (
484
+ needs.meta.outputs.run-kind == 'pr'
485
+ && (
486
+ !github.event.pull_request.draft
487
+ || contains(github.event.pull_request.labels.*.name, 'run-e2e-tests-in-draft')
488
+ )
489
+ )
490
+ || contains(fromJSON('["push-main", "storage-rc-pr", "proxy-rc-pr", "compute-rc-pr"]'), needs.meta.outputs.run-kind)
491
+ )
492
+ && !failure() && !cancelled()
481
493
}}
482
494
needs : [ check-permissions, push-neon-image-dev, push-compute-image-dev, meta ]
483
495
uses : ./.github/workflows/trigger-e2e-tests.yml
@@ -492,7 +504,7 @@ jobs:
492
504
matrix :
493
505
arch : [ x64, arm64 ]
494
506
495
- runs-on : ${{ fromJson (format('["self-hosted", "{0}"]', matrix.arch == 'arm64' && 'large-arm64' || 'large')) }}
507
+ runs-on : ${{ fromJSON (format('["self-hosted", "{0}"]', matrix.arch == 'arm64' && 'large-arm64' || 'large')) }}
496
508
497
509
permissions :
498
510
packages : write
@@ -594,7 +606,7 @@ jobs:
594
606
debian : bookworm
595
607
arch : [ x64, arm64 ]
596
608
597
- runs-on : ${{ fromJson (format('["self-hosted", "{0}"]', matrix.arch == 'arm64' && 'large-arm64' || 'large')) }}
609
+ runs-on : ${{ fromJSON (format('["self-hosted", "{0}"]', matrix.arch == 'arm64' && 'large-arm64' || 'large')) }}
598
610
599
611
steps :
600
612
- uses : actions/checkout@v4
@@ -715,7 +727,7 @@ jobs:
715
727
vm-compute-node-image-arch :
716
728
needs : [ check-permissions, meta, compute-node-image ]
717
729
if : ${{ contains(fromJSON('["push-main", "pr", "compute-rc-pr"]'), needs.meta.outputs.run-kind) }}
718
- runs-on : ${{ fromJson (format('["self-hosted", "{0}"]', matrix.arch == 'arm64' && 'large-arm64' || 'large')) }}
730
+ runs-on : ${{ fromJSON (format('["self-hosted", "{0}"]', matrix.arch == 'arm64' && 'large-arm64' || 'large')) }}
719
731
permissions :
720
732
contents : read
721
733
packages : write
@@ -815,7 +827,7 @@ jobs:
815
827
permissions :
816
828
packages : read
817
829
818
- runs-on : ${{ fromJson (format('["self-hosted", "{0}"]', matrix.arch == 'arm64' && 'small-arm64' || 'small')) }}
830
+ runs-on : ${{ fromJSON (format('["self-hosted", "{0}"]', matrix.arch == 'arm64' && 'small-arm64' || 'small')) }}
819
831
820
832
steps :
821
833
- uses : actions/checkout@v4
@@ -929,7 +941,7 @@ jobs:
929
941
env :
930
942
SOURCE_TAG : >-
931
943
${{
932
- contains(fromJson ('["storage-release", "compute-release", "proxy-release"]'), needs.meta.outputs.run-kind)
944
+ contains(fromJSON ('["storage-release", "compute-release", "proxy-release"]'), needs.meta.outputs.run-kind)
933
945
&& needs.meta.outputs.release-pr-run-id
934
946
|| needs.meta.outputs.build-tag
935
947
}}
@@ -1434,10 +1446,10 @@ jobs:
1434
1446
if : |
1435
1447
contains(needs.*.result, 'failure')
1436
1448
|| contains(needs.*.result, 'cancelled')
1437
- || (needs.check-dependencies-rust.result == 'skipped' && needs.files-changed.outputs.check-rust-dependencies == 'true')
1438
- || needs.build-and-test-locally.result == 'skipped'
1439
- || needs.check-codestyle-python.result == 'skipped'
1440
- || needs.check-codestyle-rust.result == 'skipped'
1449
+ || (needs.check-dependencies-rust.result == 'skipped' && needs.files-changed.outputs.check-rust-dependencies == 'true' && needs.meta.outputs.run-kind == 'pr' )
1450
+ || ( needs.build-and-test-locally.result == 'skipped' && needs.meta.outputs.run-kind == 'pr')
1451
+ || ( needs.check-codestyle-python.result == 'skipped' && needs.meta.outputs.run-kind == 'pr')
1452
+ || ( needs.check-codestyle-rust.result == 'skipped' && needs.meta.outputs.run-kind == 'pr')
1441
1453
|| needs.files-changed.result == 'skipped'
1442
1454
|| (needs.push-compute-image-dev.result == 'skipped' && contains(fromJSON('["push-main", "pr", "compute-release", "compute-rc-pr"]'), needs.meta.outputs.run-kind))
1443
1455
|| (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