Skip to content

Commit de43402

Browse files
authored
ci: do not wait for generating int and e2e matrix (#15546)
Previously, this was the flow (`=>` means wait for previous step, `&` means runs in parallel): Changes & Build => int-matrix => tests-int Changes & Build => e2e-matrix => e2e-prep => tests-e2e This PR runs int and e2e matrix generation immediately and in parallel, without having to wait for previous steps. Should save about 8 seconds. **New flow:** Changes & Build & int-matrix => tests-int Changes & Build & e2e-matrix => e2e-prep => tests-e2e
1 parent df42bec commit de43402

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

.github/workflows/main.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,6 @@ jobs:
149149
int-matrix:
150150
name: Setup Int Matrix
151151
runs-on: ubuntu-24.04
152-
needs: [changes, build]
153-
if: needs.changes.outputs.needs_tests == 'true'
154152
outputs:
155153
matrix: ${{ steps.generate.outputs.matrix }}
156154
steps:
@@ -172,7 +170,8 @@ jobs:
172170
173171
tests-int:
174172
runs-on: ubuntu-24.04
175-
needs: int-matrix
173+
needs: [changes, build, int-matrix]
174+
if: needs.changes.outputs.needs_tests == 'true'
176175
name: int-${{ matrix.database }}${{ matrix.total-shards > 1 && format(' ({0}/{1})', matrix.shard, matrix.total-shards) || '' }}
177176
timeout-minutes: 45
178177
strategy:
@@ -236,8 +235,6 @@ jobs:
236235
e2e-matrix:
237236
name: Setup E2E Matrix
238237
runs-on: ubuntu-24.04
239-
needs: [changes, build]
240-
if: needs.changes.outputs.needs_tests == 'true'
241238
outputs:
242239
matrix: ${{ steps.generate.outputs.matrix }}
243240
steps:
@@ -261,7 +258,8 @@ jobs:
261258
e2e-prep:
262259
name: E2E Prep
263260
runs-on: ubuntu-24.04
264-
needs: [e2e-matrix]
261+
needs: [changes, build]
262+
if: needs.changes.outputs.needs_tests == 'true'
265263
steps:
266264
- uses: actions/checkout@v5
267265

@@ -616,7 +614,7 @@ jobs:
616614
- name: Start PostgreSQL
617615
uses: CasperWA/postgresql-action@v1.2
618616
with:
619-
postgresql version: '14' # See https://hub.docker.com/_/postgres for available versions
617+
postgresql version: "14" # See https://hub.docker.com/_/postgres for available versions
620618
postgresql db: ${{ env.POSTGRES_DB }}
621619
postgresql user: ${{ env.POSTGRES_USER }}
622620
postgresql password: ${{ env.POSTGRES_PASSWORD }}
@@ -785,4 +783,4 @@ jobs:
785783
if: github.event.pull_request.head.repo.fork == false
786784
uses: exoego/esbuild-bundle-analyzer@v1
787785
with:
788-
metafiles: 'packages/payload/meta_index.json,packages/payload/meta_shared.json,packages/ui/meta_client.json,packages/ui/meta_shared.json,packages/next/meta_index.json,packages/richtext-lexical/meta_client.json'
786+
metafiles: "packages/payload/meta_index.json,packages/payload/meta_shared.json,packages/ui/meta_client.json,packages/ui/meta_shared.json,packages/next/meta_index.json,packages/richtext-lexical/meta_client.json"

0 commit comments

Comments
 (0)