Skip to content

Commit dad7543

Browse files
fix(workflows): update patch jobs conditions and naming (#9117)
- Modified job conditions in multiple workflow files to ensure they only run for pull requests from external repositories. - Updated job names for clarity and consistency across `cd-deploy-nodes-gcp`, `ci-tests`, and `docs-deploy-firebase` workflows, and to sync them with our rulesets - Enhanced comments to emphasize the importance of synchronizing job names across related workflow files. Fixes #9108
1 parent 7991164 commit dad7543

6 files changed

+114
-69
lines changed

.github/workflows/cd-deploy-nodes-gcp.patch-external.yml

+11-8
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ name: Deploy Nodes to GCP
77
on:
88
pull_request:
99

10-
# IMPORTANT
11-
#
12-
# The job names in `cd-deploy-nodes-gcp.yml`, `cd-deploy-nodes-gcp.patch.yml` and
13-
# `cd-deploy-nodes-gcp.patch-external.yml` must be kept in sync.
10+
#! IMPORTANT
11+
#!
12+
#! The job names in `cd-deploy-nodes-gcp.yml`, `cd-deploy-nodes-gcp.patch.yml` and
13+
#! `cd-deploy-nodes-gcp.patch-external.yml` must be kept in sync.
1414
jobs:
1515
# We don't patch the testnet job, because testnet isn't required to merge (it's too unstable)
1616
get-disk-name:
17-
name: Get disk name
18-
if: ${{ startsWith(github.event_name, 'pull') && github.event.pull_request.head.repo.fork }}
17+
name: Get disk name / Get Mainnet cached disk
18+
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork }}
1919
runs-on: ubuntu-latest
2020
steps:
2121
- run: 'echo "Skipping job on fork"'
@@ -24,6 +24,7 @@ jobs:
2424
name: Build CD Docker / Build images
2525
# Only run on PRs from external repositories, skipping ZF branches and tags.
2626
runs-on: ubuntu-latest
27+
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork }}
2728
steps:
2829
- run: 'echo "Skipping job on fork"'
2930

@@ -33,20 +34,22 @@ jobs:
3334
# change.
3435
needs: build
3536
runs-on: ubuntu-latest
37+
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork }}
3638
steps:
3739
- run: 'echo "Skipping job on fork"'
3840

3941
test-configuration-file-testnet:
40-
name: Test CD testnet Docker config file / Test default-conf in Docker
42+
name: Test CD testnet Docker config file / Test testnet-conf in Docker
4143
needs: build
4244
runs-on: ubuntu-latest
45+
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork }}
4346
steps:
4447
- run: 'echo "Skipping job on fork"'
4548

4649
test-zebra-conf-path:
4750
name: Test CD custom Docker config file / Test custom-conf in Docker
4851
needs: build
4952
runs-on: ubuntu-latest
53+
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork }}
5054
steps:
5155
- run: 'echo "Skipping job on fork"'
52-

.github/workflows/cd-deploy-nodes-gcp.patch.yml

+16-12
Original file line numberDiff line numberDiff line change
@@ -22,39 +22,43 @@ on:
2222
- '.github/workflows/cd-deploy-nodes-gcp.yml'
2323
- '.github/workflows/sub-build-docker-image.yml'
2424

25-
# IMPORTANT
26-
#
27-
# The job names in `cd-deploy-nodes-gcp.yml`, `cd-deploy-nodes-gcp.patch.yml` and
28-
# `cd-deploy-nodes-gcp.patch-external.yml` must be kept in sync.
25+
#! IMPORTANT
26+
#!
27+
#! The job names in `cd-deploy-nodes-gcp.yml`, `cd-deploy-nodes-gcp.patch.yml` and
28+
#! `cd-deploy-nodes-gcp.patch-external.yml` must be kept in sync.
2929
jobs:
3030
# We don't patch the testnet job, because testnet isn't required to merge (it's too unstable)
31+
get-disk-name:
32+
name: Get disk name / Get Mainnet cached disk
33+
runs-on: ubuntu-latest
34+
if: ${{ github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork }}
35+
steps:
36+
- run: 'echo "No build required"'
37+
3138
build:
3239
name: Build CD Docker / Build images
3340
runs-on: ubuntu-latest
41+
if: ${{ github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork }}
3442
steps:
3543
- run: 'echo "No build required"'
3644

3745
test-configuration-file:
3846
name: Test CD default Docker config file / Test default-conf in Docker
3947
runs-on: ubuntu-latest
48+
if: ${{ github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork }}
4049
steps:
4150
- run: 'echo "No build required"'
4251

4352
test-configuration-file-testnet:
44-
name: Test CD testnet Docker config file / Test default-conf in Docker
53+
name: Test CD testnet Docker config file / Test testnet-conf in Docker
4554
runs-on: ubuntu-latest
55+
if: ${{ github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork }}
4656
steps:
4757
- run: 'echo "No build required"'
4858

49-
5059
test-zebra-conf-path:
5160
name: Test CD custom Docker config file / Test custom-conf in Docker
5261
runs-on: ubuntu-latest
53-
steps:
54-
- run: 'echo "No build required"'
55-
56-
get-disk-name:
57-
name: Get disk name
58-
runs-on: ubuntu-latest
62+
if: ${{ github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork }}
5963
steps:
6064
- run: 'echo "No build required"'

.github/workflows/ci-tests.patch-external.yml

+38-20
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
build:
1616
name: Build CI Docker / Build images
1717
# Only run on PRs from external repositories.
18-
if: ${{ startsWith(github.event_name, 'pull') && github.event.pull_request.head.repo.fork }}
18+
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork }}
1919
runs-on: ubuntu-latest
2020
steps:
2121
- run: 'echo "Skipping job on fork"'
@@ -24,116 +24,134 @@ jobs:
2424
## The following jobs are related to sub-ci-unit-tests-docker.yml
2525
###
2626
test-all:
27-
name: Test all
27+
name: Unit tests / Test all
2828
runs-on: ubuntu-latest
29+
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork }}
2930
steps:
3031
- run: 'echo "Skipping job on fork"'
3132

3233
test-fake-activation-heights:
33-
name: Test with fake activation heights
34+
name: Unit tests / Test with fake activation heights
3435
runs-on: ubuntu-latest
36+
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork }}
3537
steps:
3638
- run: 'echo "Skipping job on fork"'
3739

3840
test-empty-sync:
39-
name: Test checkpoint sync from empty state
41+
name: Unit tests / Test checkpoint sync from empty state
4042
runs-on: ubuntu-latest
43+
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork }}
4144
steps:
4245
- run: 'echo "Skipping job on fork"'
4346

4447
test-lightwalletd-integration:
45-
name: Test integration with lightwalletd
48+
name: Unit tests / Test integration with lightwalletd
4649
runs-on: ubuntu-latest
50+
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork }}
4751
steps:
4852
- run: 'echo "Skipping job on fork"'
4953

5054
test-configuration-file:
51-
name: Test CI default Docker config file / Test default-conf in Docker
55+
name: Unit tests / Test CI default Docker config file / Test default-conf in Docker
5256
runs-on: ubuntu-latest
57+
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork }}
5358
steps:
5459
- run: 'echo "Skipping job on fork"'
5560

5661
test-configuration-file-testnet:
57-
name: Test CI testnet Docker config file / Test default-conf in Docker
62+
name: Unit tests / Test CI testnet Docker config file / Test testnet-conf in Docker
5863
needs: build
5964
runs-on: ubuntu-latest
65+
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork }}
6066
steps:
6167
- run: 'echo "Skipping job on fork"'
6268

6369
test-zebra-conf-path:
64-
name: Test CI custom Docker config file / Test custom-conf in Docker
70+
name: Unit tests / Test CI custom Docker config file / Test custom-conf in Docker
6571
runs-on: ubuntu-latest
72+
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork }}
6673
steps:
6774
- run: 'echo "Skipping job on fork"'
6875

69-
76+
####
7077
####
7178
## The following jobs are related to sub-ci-integration-tests-gcp.yml
7279
###
7380

7481
# We don't patch the testnet job, because testnet isn't required to merge (it's too unstable)
7582
get-available-disks:
76-
name: Check if cached state disks exist for Mainnet / Check if cached state disks exist
83+
name: Integration tests / Check if cached state disks exist for Mainnet / Get Mainnet cached disk
7784
runs-on: ubuntu-latest
85+
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork }}
7886
steps:
7987
- run: 'echo "Skipping job on fork"'
8088

8189
test-stateful-sync:
82-
name: Zebra checkpoint update / Run sync-past-checkpoint test
90+
name: Integration tests / Zebra checkpoint update / Run sync-past-checkpoint test
8391
runs-on: ubuntu-latest
92+
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork }}
8493
steps:
8594
- run: 'echo "Skipping job on fork"'
8695

8796
test-update-sync:
88-
name: Zebra tip update / Run update-to-tip test
97+
name: Integration tests / Zebra tip update / Run update-to-tip test
8998
runs-on: ubuntu-latest
99+
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork }}
90100
steps:
91101
- run: 'echo "Skipping job on fork"'
92102

93103
checkpoints-mainnet:
94-
name: Generate checkpoints mainnet / Run checkpoints-mainnet test
104+
name: Integration tests / Generate checkpoints mainnet / Run checkpoints-mainnet test
95105
runs-on: ubuntu-latest
106+
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork }}
96107
steps:
97108
- run: 'echo "Skipping job on fork"'
98109

99110
lightwalletd-rpc-test:
100-
name: Zebra tip JSON-RPC / Run fully-synced-rpc test
111+
name: Integration tests / Zebra tip JSON-RPC / Run fully-synced-rpc test
101112
runs-on: ubuntu-latest
113+
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork }}
102114
steps:
103115
- run: 'echo "Skipping job on fork"'
104116

105117
lightwalletd-transactions-test:
106-
name: lightwalletd tip send / Run lwd-send-transactions test
118+
name: Integration tests / lightwalletd tip send / Run lwd-send-transactions test
107119
runs-on: ubuntu-latest
120+
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork }}
108121
steps:
109122
- run: 'echo "Skipping job on fork"'
110123

111124
get-block-template-test:
112-
name: get block template / Run get-block-template test
125+
name: Integration tests / get block template / Run get-block-template test
113126
runs-on: ubuntu-latest
127+
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork }}
114128
steps:
115129
- run: 'echo "Skipping job on fork"'
116130

117131
submit-block-test:
118-
name: submit block / Run submit-block test
132+
name: Integration tests / submit block / Run submit-block test
119133
runs-on: ubuntu-latest
134+
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork }}
120135
steps:
121136
- run: 'echo "Skipping job on fork"'
122137

123138
lightwalletd-full-sync:
124-
name: lightwalletd tip / Run lwd-full-sync test
139+
name: Integration tests / lightwalletd tip / Run lwd-full-sync test
125140
runs-on: ubuntu-latest
141+
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork }}
126142
steps:
127143
- run: 'echo "Skipping job on fork"'
128144

129145
lightwalletd-update-sync:
130-
name: lightwalletd tip update / Run lwd-update-sync test
146+
name: Integration tests / lightwalletd tip update / Run lwd-update-sync test
131147
runs-on: ubuntu-latest
148+
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork }}
132149
steps:
133150
- run: 'echo "Skipping job on fork"'
134151

135152
lightwalletd-grpc-test:
136-
name: lightwalletd GRPC tests / Run lwd-grpc-wallet test
153+
name: Integration tests / lightwalletd GRPC tests / Run lwd-grpc-wallet test
137154
runs-on: ubuntu-latest
155+
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork }}
138156
steps:
139157
- run: 'echo "Skipping job on fork"'

0 commit comments

Comments
 (0)