Skip to content

Commit 5aff17e

Browse files
adrians5jtclaude
authored
ci(e2e): run the login test and drop the Pulumi backend URL (6.5.0) (#6018)
Co-authored-by: t <a@b.c> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 8f74231 commit 5aff17e

8 files changed

Lines changed: 144 additions & 150 deletions

File tree

‎.github/workflows/pullRequestsCommandE2e.yml‎

Lines changed: 32 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -141,40 +141,11 @@ jobs:
141141
env:
142142
NODE_OPTIONS: '--max_old_space_size=4096'
143143
YARN_ENABLE_IMMUTABLE_INSTALLS: false
144-
e2e-wby-cms-ddb-constants:
145-
needs:
146-
- baseBranch
147-
- constants
148-
- build
149-
name: Constants - DDB
150-
outputs:
151-
pulumi-backend-url: ${{ steps.pulumi-backend-url.outputs.pulumi-backend-url }}
152-
steps:
153-
- uses: actions/setup-node@v5
154-
with:
155-
node-version: 24
156-
- uses: actions/checkout@v5
157-
with:
158-
path: ${{ needs.baseBranch.outputs.base-branch }}
159-
- name: Checkout Pull Request
160-
working-directory: ${{ needs.baseBranch.outputs.base-branch }}
161-
run: gh pr checkout ${{ github.event.issue.number }}
162-
env:
163-
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
164-
- name: Get Pulumi backend URL
165-
id: get-pulumi-backend-url
166-
run: >-
167-
echo "pulumi-backend-url=${{ secrets.WEBINY_PULUMI_BACKEND }}${{
168-
github.run_id }}_ddb" >> $GITHUB_OUTPUT
169-
runs-on: ubuntu-latest
170-
env:
171-
NODE_OPTIONS: '--max_old_space_size=4096'
172-
YARN_ENABLE_IMMUTABLE_INSTALLS: false
173144
e2e-wby-cms-ddb-project-setup:
174145
needs:
175146
- baseBranch
176147
- constants
177-
- e2e-wby-cms-ddb-constants
148+
- build
178149
- checkComment
179150
name: E2E (DDB) - Project setup
180151
environment: next
@@ -183,7 +154,6 @@ jobs:
183154
YARN_ENABLE_IMMUTABLE_INSTALLS: false
184155
PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }}
185156
PULUMI_SECRETS_PROVIDER: ${{ secrets.PULUMI_SECRETS_PROVIDER }}
186-
WEBINY_PULUMI_BACKEND: ${{ needs.e2e-wby-cms-ddb-constants.outputs.pulumi-backend-url }}
187157
WEBINY_INFRA_API_MAX_BUNDLE_SIZE: ${{ vars.WEBINY_INFRA_API_MAX_BUNDLE_SIZE }}
188158
steps:
189159
- uses: actions/setup-node@v5
@@ -321,43 +291,29 @@ jobs:
321291
if-no-files-found: ignore
322292
include-hidden-files: true
323293
path: ${{ needs.baseBranch.outputs.base-branch }}/e2e/.e2e
324-
runs-on: ubuntu-latest
325-
permissions:
326-
id-token: write
327-
e2e-wby-cms-ddb-os-constants:
328-
needs:
329-
- baseBranch
330-
- constants
331-
- build
332-
name: Constants - DDB-OS
333-
outputs:
334-
pulumi-backend-url: ${{ steps.pulumi-backend-url.outputs.pulumi-backend-url }}
335-
steps:
336-
- uses: actions/setup-node@v5
337-
with:
338-
node-version: 24
339-
- uses: actions/checkout@v5
340-
with:
341-
path: ${{ needs.baseBranch.outputs.base-branch }}
342-
- name: Checkout Pull Request
294+
- name: E2E - run tests
343295
working-directory: ${{ needs.baseBranch.outputs.base-branch }}
344-
run: gh pr checkout ${{ github.event.issue.number }}
345296
env:
346-
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
347-
- name: Get Pulumi backend URL
348-
id: get-pulumi-backend-url
349-
run: >-
350-
echo "pulumi-backend-url=${{ secrets.WEBINY_PULUMI_BACKEND }}${{
351-
github.run_id }}_ddb-os" >> $GITHUB_OUTPUT
297+
E2E_ADMIN_URL: ${{ steps.admin-url.outputs.admin-url }}
298+
E2E_TELEMETRY_DISABLED: '1'
299+
run: yarn e2e --exclude-tag wcp,ai,installation --pass-with-no-tests
300+
- name: E2E - upload test results
301+
if: failure()
302+
uses: actions/upload-artifact@v6
303+
with:
304+
name: e2e-test-results-ddb
305+
retention-days: 7
306+
if-no-files-found: ignore
307+
include-hidden-files: true
308+
path: ${{ needs.baseBranch.outputs.base-branch }}/e2e/.e2e
352309
runs-on: ubuntu-latest
353-
env:
354-
NODE_OPTIONS: '--max_old_space_size=4096'
355-
YARN_ENABLE_IMMUTABLE_INSTALLS: false
310+
permissions:
311+
id-token: write
356312
e2e-wby-cms-ddb-os-project-setup:
357313
needs:
358314
- baseBranch
359315
- constants
360-
- e2e-wby-cms-ddb-os-constants
316+
- build
361317
- checkComment
362318
name: E2E (DDB-OS) - Project setup
363319
environment: next
@@ -366,7 +322,6 @@ jobs:
366322
YARN_ENABLE_IMMUTABLE_INSTALLS: false
367323
PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }}
368324
PULUMI_SECRETS_PROVIDER: ${{ secrets.PULUMI_SECRETS_PROVIDER }}
369-
WEBINY_PULUMI_BACKEND: ${{ needs.e2e-wby-cms-ddb-os-constants.outputs.pulumi-backend-url }}
370325
WEBINY_INFRA_API_MAX_BUNDLE_SIZE: ${{ vars.WEBINY_INFRA_API_MAX_BUNDLE_SIZE }}
371326
AWS_OPENSEARCH_DOMAIN_NAME: ${{ secrets.OPENSEARCH_DOMAIN_NAME }}
372327
OPENSEARCH_ENDPOINT: ${{ secrets.OPENSEARCH_ENDPOINT }}
@@ -525,6 +480,21 @@ jobs:
525480
if-no-files-found: ignore
526481
include-hidden-files: true
527482
path: ${{ needs.baseBranch.outputs.base-branch }}/e2e/.e2e
483+
- name: E2E - run tests
484+
working-directory: ${{ needs.baseBranch.outputs.base-branch }}
485+
env:
486+
E2E_ADMIN_URL: ${{ steps.admin-url.outputs.admin-url }}
487+
E2E_TELEMETRY_DISABLED: '1'
488+
run: yarn e2e --exclude-tag wcp,ai,installation --pass-with-no-tests
489+
- name: E2E - upload test results
490+
if: failure()
491+
uses: actions/upload-artifact@v6
492+
with:
493+
name: e2e-test-results-ddb-os
494+
retention-days: 7
495+
if-no-files-found: ignore
496+
include-hidden-files: true
497+
path: ${{ needs.baseBranch.outputs.base-branch }}/e2e/.e2e
528498
runs-on: ubuntu-latest
529499
permissions:
530500
id-token: write

‎.github/workflows/push.yml‎

Lines changed: 30 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -489,31 +489,10 @@ jobs:
489489
working-directory: v6
490490
permissions:
491491
id-token: write
492-
e2eTests-ddb-constants:
493-
name: E2E (DDB) - Constants
494-
needs:
495-
- build
496-
outputs:
497-
pulumi-backend-url: ${{ steps.pulumi-backend-url.outputs.pulumi-backend-url }}
498-
steps:
499-
- uses: actions/setup-node@v5
500-
with:
501-
node-version: 24
502-
- uses: actions/checkout@v5
503-
- name: Get Pulumi backend URL
504-
id: get-pulumi-backend-url
505-
run: >-
506-
echo "pulumi-backend-url=${{ secrets.WEBINY_PULUMI_BACKEND }}${{
507-
github.run_id }}_ddb" >> $GITHUB_OUTPUT
508-
runs-on: ubuntu-latest
509-
env:
510-
NODE_OPTIONS: '--max_old_space_size=4096'
511-
YARN_ENABLE_IMMUTABLE_INSTALLS: false
512492
e2eTests-ddb-setup:
513493
needs:
514494
- constants
515495
- build
516-
- e2eTests-ddb-constants
517496
runs-on: webiny-build-packages
518497
name: E2E (DDB) - Project setup
519498
environment: next
@@ -522,7 +501,6 @@ jobs:
522501
YARN_ENABLE_IMMUTABLE_INSTALLS: 'false'
523502
PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }}
524503
PULUMI_SECRETS_PROVIDER: ${{ secrets.PULUMI_SECRETS_PROVIDER }}
525-
WEBINY_PULUMI_BACKEND: ${{ needs.e2eTests-ddb-constants.outputs.pulumi-backend-url }}
526504
WEBINY_INFRA_API_MAX_BUNDLE_SIZE: ${{ vars.WEBINY_INFRA_API_MAX_BUNDLE_SIZE }}
527505
steps:
528506
- uses: actions/setup-node@v5
@@ -641,33 +619,27 @@ jobs:
641619
if-no-files-found: ignore
642620
include-hidden-files: true
643621
path: v6/e2e/.e2e
622+
- name: E2E - run tests
623+
working-directory: v6
624+
env:
625+
E2E_ADMIN_URL: ${{ steps.admin-url.outputs.admin-url }}
626+
E2E_TELEMETRY_DISABLED: '1'
627+
run: yarn e2e --exclude-tag wcp,ai,installation --pass-with-no-tests
628+
- name: E2E - upload test results
629+
if: failure()
630+
uses: actions/upload-artifact@v6
631+
with:
632+
name: e2e-test-results-ddb
633+
retention-days: 7
634+
if-no-files-found: ignore
635+
include-hidden-files: true
636+
path: v6/e2e/.e2e
644637
permissions:
645638
id-token: write
646-
e2eTests-ddb-os-constants:
647-
name: E2E (DDB+OS) - Constants
648-
needs:
649-
- build
650-
outputs:
651-
pulumi-backend-url: ${{ steps.pulumi-backend-url.outputs.pulumi-backend-url }}
652-
steps:
653-
- uses: actions/setup-node@v5
654-
with:
655-
node-version: 24
656-
- uses: actions/checkout@v5
657-
- name: Get Pulumi backend URL
658-
id: get-pulumi-backend-url
659-
run: >-
660-
echo "pulumi-backend-url=${{ secrets.WEBINY_PULUMI_BACKEND }}${{
661-
github.run_id }}_ddb-os" >> $GITHUB_OUTPUT
662-
runs-on: ubuntu-latest
663-
env:
664-
NODE_OPTIONS: '--max_old_space_size=4096'
665-
YARN_ENABLE_IMMUTABLE_INSTALLS: false
666639
e2eTests-ddb-os-setup:
667640
needs:
668641
- constants
669642
- build
670-
- e2eTests-ddb-os-constants
671643
runs-on: webiny-build-packages
672644
name: E2E (DDB+OS) - Project setup
673645
environment: next
@@ -676,7 +648,6 @@ jobs:
676648
YARN_ENABLE_IMMUTABLE_INSTALLS: 'false'
677649
PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }}
678650
PULUMI_SECRETS_PROVIDER: ${{ secrets.PULUMI_SECRETS_PROVIDER }}
679-
WEBINY_PULUMI_BACKEND: ${{ needs.e2eTests-ddb-os-constants.outputs.pulumi-backend-url }}
680651
WEBINY_INFRA_API_MAX_BUNDLE_SIZE: ${{ vars.WEBINY_INFRA_API_MAX_BUNDLE_SIZE }}
681652
AWS_OPENSEARCH_DOMAIN_NAME: ${{ secrets.OPENSEARCH_DOMAIN_NAME }}
682653
OPENSEARCH_ENDPOINT: ${{ secrets.OPENSEARCH_ENDPOINT }}
@@ -816,5 +787,20 @@ jobs:
816787
if-no-files-found: ignore
817788
include-hidden-files: true
818789
path: v6/e2e/.e2e
790+
- name: E2E - run tests
791+
working-directory: v6
792+
env:
793+
E2E_ADMIN_URL: ${{ steps.admin-url.outputs.admin-url }}
794+
E2E_TELEMETRY_DISABLED: '1'
795+
run: yarn e2e --exclude-tag wcp,ai,installation --pass-with-no-tests
796+
- name: E2E - upload test results
797+
if: failure()
798+
uses: actions/upload-artifact@v6
799+
with:
800+
name: e2e-test-results-ddb-os
801+
retention-days: 7
802+
if-no-files-found: ignore
803+
include-hidden-files: true
804+
path: v6/e2e/.e2e
819805
permissions:
820806
id-token: write

‎.github/workflows/wac/pullRequestsCommandE2e.wac.ts‎

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
createInstallBuildSteps,
77
createRunBuildCacheSteps,
88
createSetupVerdaccioSteps,
9+
createUnlicensedE2eSteps,
910
createYarnCacheSteps
1011
} from "./steps/index.js";
1112
import { AWS_REGION, BUILD_PACKAGES_RUNNER, NODE_OPTIONS } from "./utils/index.js";
@@ -30,37 +31,21 @@ const createCheckoutPrSteps = () =>
3031
}
3132
] as NonNullable<NormalJob["steps"]>;
3233

33-
// Scaffold a project, deploy it to AWS, then run the installation test against the deployed Admin
34-
// app. One variant per storage setup ("ddb", "ddb-os").
34+
// Scaffold a project, deploy it to AWS, then run the installation and login tests against the
35+
// deployed Admin app. One variant per storage setup ("ddb", "ddb-os").
36+
//
37+
// Pulumi state stays in the project's local `.pulumi` folder and goes away with the runner. The
38+
// nightly `cleanup.yml` removes what was deployed with aws-nuke, so nothing needs the state later.
3539
const createE2eJobs = (dbSetup: string) => {
3640
const jobNames = {
37-
constants: `e2e-wby-cms-${dbSetup}-constants`,
3841
projectSetup: `e2e-wby-cms-${dbSetup}-project-setup`
3942
};
4043

4144
const dbDisplayName = dbSetup === "ddb-os" ? "DDB+OS" : "DDB";
4245

43-
const constantsJob: NormalJob = createJob({
44-
needs: ["baseBranch", "constants", "build"],
45-
name: `Constants - ${dbSetup.toUpperCase()}`,
46-
outputs: {
47-
"pulumi-backend-url": "${{ steps.pulumi-backend-url.outputs.pulumi-backend-url }}"
48-
},
49-
checkout: { path: DIR_WEBINY_JS },
50-
steps: [
51-
...createCheckoutPrSteps(),
52-
{
53-
name: "Get Pulumi backend URL",
54-
id: "get-pulumi-backend-url",
55-
run: `echo "pulumi-backend-url=\${{ secrets.WEBINY_PULUMI_BACKEND }}\${{ github.run_id }}_${dbSetup}" >> $GITHUB_OUTPUT`
56-
}
57-
]
58-
});
59-
6046
const env: Record<string, string> = {
6147
PULUMI_CONFIG_PASSPHRASE: "${{ secrets.PULUMI_CONFIG_PASSPHRASE }}",
6248
PULUMI_SECRETS_PROVIDER: "${{ secrets.PULUMI_SECRETS_PROVIDER }}",
63-
WEBINY_PULUMI_BACKEND: `\${{ needs.${jobNames.constants}.outputs.pulumi-backend-url }}`,
6449
WEBINY_INFRA_API_MAX_BUNDLE_SIZE: "${{ vars.WEBINY_INFRA_API_MAX_BUNDLE_SIZE }}"
6550
};
6651

@@ -73,7 +58,7 @@ const createE2eJobs = (dbSetup: string) => {
7358
}
7459

7560
const projectSetupJob: NormalJob = createJob({
76-
needs: ["baseBranch", "constants", jobNames.constants, "checkComment"],
61+
needs: ["baseBranch", "constants", "build", "checkComment"],
7762
name: `E2E (${dbSetup.toUpperCase()}) - Project setup`,
7863
environment: "next",
7964
env,
@@ -187,12 +172,16 @@ const createE2eJobs = (dbSetup: string) => {
187172
workingDirectory: DIR_WEBINY_JS,
188173
adminUrl: "${{ steps.admin-url.outputs.admin-url }}",
189174
artifactName: `e2e-results-${dbSetup}`
175+
}),
176+
...createUnlicensedE2eSteps({
177+
workingDirectory: DIR_WEBINY_JS,
178+
adminUrl: "${{ steps.admin-url.outputs.admin-url }}",
179+
artifactName: `e2e-test-results-${dbSetup}`
190180
})
191181
]
192182
});
193183

194184
return {
195-
[jobNames.constants]: constantsJob,
196185
[jobNames.projectSetup]: projectSetupJob
197186
};
198187
};

0 commit comments

Comments
 (0)