Skip to content

Commit 32e742e

Browse files
committed
ci: add v5_push flow
1 parent 3ef4b4f commit 32e742e

File tree

2 files changed

+5
-331
lines changed

2 files changed

+5
-331
lines changed

.github/workflows/v5_Push.yml

Lines changed: 1 addition & 317 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ jobs:
131131
run: yarn build:quick
132132
working-directory: v5
133133
- name: Sync Dependencies Verification
134-
run: yarn verify-dependencies
134+
run: yarn webiny verify-dependencies
135135
working-directory: v5
136136
runs-on: ubuntu-latest
137137
env:
@@ -294,104 +294,6 @@ jobs:
294294
- name: Run tests
295295
run: yarn test ${{ matrix.package.cmd }}
296296
working-directory: v5
297-
jestTestsDdbEs:
298-
needs:
299-
- constants
300-
- build
301-
name: ${{ matrix.package.cmd }}
302-
strategy:
303-
fail-fast: false
304-
matrix:
305-
os:
306-
- ubuntu-latest
307-
node:
308-
- 22
309-
package: >-
310-
${{ fromJson('[{"cmd":"packages/api-aco
311-
--storage=ddb-es,ddb","storage":"ddb-es","packageName":"api-aco","id":"8f23ec33f547aa62236f5c71115688d6"},{"cmd":"packages/api-audit-logs
312-
--storage=ddb-es,ddb","storage":"ddb-es","packageName":"api-audit-logs","id":"a292444cd9100f78d8fc196274393ea8"},{"cmd":"packages/api-dynamodb-to-elasticsearch
313-
--storage=ddb-es,ddb","storage":["ddb-es"],"packageName":"api-dynamodb-to-elasticsearch","id":"e2c325f0940ba5fb5a891a8cf74fca61"},{"cmd":"packages/api-elasticsearch
314-
--storage=ddb-es,ddb","storage":["ddb-es"],"packageName":"api-elasticsearch","id":"5963079c60b96202bbaf2a802ad14383"},{"cmd":"packages/api-elasticsearch-tasks
315-
--storage=ddb-es,ddb","storage":"ddb-es","packageName":"api-elasticsearch-tasks","id":"d81ad1d024a8746cc440e2e548770f8f"},{"cmd":"packages/api-file-manager
316-
--storage=ddb-es,ddb","storage":"ddb-es","packageName":"api-file-manager","id":"d6f293add4a252b96cbd770ab6e80557"},{"cmd":"packages/api-file-manager-aco
317-
--storage=ddb-es,ddb","storage":"ddb-es","packageName":"api-file-manager-aco","id":"41bae3570bd9f1090c32049c4e7e327b"},{"cmd":"packages/api-form-builder
318-
--storage=ddb-es,ddb","storage":"ddb-es","packageName":"api-form-builder","id":"3753bde0144d808eb15c755b7176386c"},{"cmd":"packages/api-form-builder-so-ddb-es
319-
--storage=ddb-es,ddb","storage":"ddb-es","packageName":"api-form-builder-so-ddb-es","id":"be1748722ce53a7383696bdc9aecb36e"},{"cmd":"packages/api-headless-cms
320-
--storage=ddb-es,ddb
321-
--shard=1/6","storage":"ddb-es","packageName":"api-headless-cms","id":"c9e8cf197d213d99f54ae218b027db43"},{"cmd":"packages/api-headless-cms
322-
--storage=ddb-es,ddb
323-
--shard=2/6","storage":"ddb-es","packageName":"api-headless-cms","id":"0db69460c7bcc2bd54f21ae32c2436a0"},{"cmd":"packages/api-headless-cms
324-
--storage=ddb-es,ddb
325-
--shard=3/6","storage":"ddb-es","packageName":"api-headless-cms","id":"13763c404c6788aa580d8b9fa8f52239"},{"cmd":"packages/api-headless-cms
326-
--storage=ddb-es,ddb
327-
--shard=4/6","storage":"ddb-es","packageName":"api-headless-cms","id":"795fb79efa47ed2c7b14b1601b03db21"},{"cmd":"packages/api-headless-cms
328-
--storage=ddb-es,ddb
329-
--shard=5/6","storage":"ddb-es","packageName":"api-headless-cms","id":"775a20e72e2f9e3db4c119b08dca9858"},{"cmd":"packages/api-headless-cms
330-
--storage=ddb-es,ddb
331-
--shard=6/6","storage":"ddb-es","packageName":"api-headless-cms","id":"d9e94bb347222577c3a3c8ea3cc41e47"},{"cmd":"packages/api-headless-cms-aco
332-
--storage=ddb-es,ddb","storage":"ddb-es","packageName":"api-headless-cms-aco","id":"873cd623b92712713e58e7dc6ddbe5d9"},{"cmd":"packages/api-headless-cms-bulk-actions
333-
--storage=ddb-es,ddb","storage":"ddb-es","packageName":"api-headless-cms-bulk-actions","id":"d57a9e2a64e475f4629a14f4e1130e78"},{"cmd":"packages/api-headless-cms-ddb-es
334-
--storage=ddb-es,ddb","storage":"ddb-es","packageName":"api-headless-cms-ddb-es","id":"f64e01fd77d4d1c22803e1523560b07c"},{"cmd":"packages/api-headless-cms-es-tasks
335-
--storage=ddb-es,ddb","storage":["ddb-es"],"packageName":"api-headless-cms-es-tasks","id":"f857b5e4a7381a7f10eadef6ec83d9e0"},{"cmd":"packages/api-headless-cms-import-export
336-
--storage=ddb-es,ddb","storage":"ddb-es","packageName":"api-headless-cms-import-export","id":"fa2cbb7997de447c87e3f1b646008711"},{"cmd":"packages/api-mailer
337-
--storage=ddb-es,ddb","storage":"ddb-es","packageName":"api-mailer","id":"ccc077215f734fbec817d90fdb04d423"},{"cmd":"packages/api-page-builder
338-
--storage=ddb-es,ddb
339-
--shard=1/6","storage":"ddb-es","packageName":"api-page-builder","id":"a9d5f7851f0b921677df8521ff899f86"},{"cmd":"packages/api-page-builder
340-
--storage=ddb-es,ddb
341-
--shard=2/6","storage":"ddb-es","packageName":"api-page-builder","id":"d6c00270cbcfa826dab79e8c703c9eb5"},{"cmd":"packages/api-page-builder
342-
--storage=ddb-es,ddb
343-
--shard=3/6","storage":"ddb-es","packageName":"api-page-builder","id":"b407ab6f87871e108480b0fa3bc17902"},{"cmd":"packages/api-page-builder
344-
--storage=ddb-es,ddb
345-
--shard=4/6","storage":"ddb-es","packageName":"api-page-builder","id":"9aa4fe8f6e30c49c501003a914b2ca5c"},{"cmd":"packages/api-page-builder
346-
--storage=ddb-es,ddb
347-
--shard=5/6","storage":"ddb-es","packageName":"api-page-builder","id":"a84a7bf736194196387f2959132abfdd"},{"cmd":"packages/api-page-builder
348-
--storage=ddb-es,ddb
349-
--shard=6/6","storage":"ddb-es","packageName":"api-page-builder","id":"02927f20dd60108bec8356b6dae55357"},{"cmd":"packages/api-page-builder-aco
350-
--storage=ddb-es,ddb","storage":"ddb-es","packageName":"api-page-builder-aco","id":"d12985ec4dcdb80af419125d236a73d8"},{"cmd":"packages/api-page-builder-so-ddb-es
351-
--storage=ddb-es,ddb","storage":"ddb-es","packageName":"api-page-builder-so-ddb-es","id":"911289d4016adf351238298ce5b41ac8"},{"cmd":"packages/api-serverless-cms
352-
--storage=ddb-es,ddb","storage":"ddb-es","packageName":"api-serverless-cms","id":"3d8f52f5b779b9ded3d746716fed019f"},{"cmd":"packages/migrations
353-
--storage=ddb-es,ddb","storage":["ddb-es"],"packageName":"migrations","id":"7262de0ebd8c413fce5cc1428462df1a"},{"cmd":"packages/tasks
354-
--storage=ddb-es,ddb","storage":"ddb-es","packageName":"tasks","id":"0c5cd8395d241e54e3488ffcc1c81c26"}]')
355-
}}
356-
runs-on: ${{ matrix.os }}
357-
env:
358-
NODE_OPTIONS: '--max_old_space_size=4096'
359-
YARN_ENABLE_IMMUTABLE_INSTALLS: false
360-
AWS_REGION: eu-central-1
361-
AWS_ELASTIC_SEARCH_DOMAIN_NAME: ${{ secrets.AWS_ELASTIC_SEARCH_DOMAIN_NAME }}
362-
ELASTIC_SEARCH_ENDPOINT: ${{ secrets.ELASTIC_SEARCH_ENDPOINT }}
363-
ELASTIC_SEARCH_INDEX_PREFIX: ${{ matrix.package.id }}
364-
steps:
365-
- uses: actions/setup-node@v4
366-
with:
367-
node-version: 22
368-
- name: Configure AWS Credentials
369-
uses: aws-actions/configure-aws-credentials@v4
370-
with:
371-
role-to-assume: arn:aws:iam::726952677045:role/GitHubActionsWebinyJs
372-
aws-region: eu-central-1
373-
- uses: actions/checkout@v4
374-
with:
375-
path: v5
376-
- uses: actions/cache@v4
377-
with:
378-
path: v5/.yarn/cache
379-
key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
380-
- uses: actions/cache@v4
381-
with:
382-
path: v5/.webiny/cached-packages
383-
key: ${{ needs.constants.outputs.run-cache-key }}
384-
- name: Install dependencies
385-
run: yarn --immutable
386-
working-directory: v5
387-
- name: Build packages
388-
run: yarn build:quick
389-
working-directory: v5
390-
- name: Run tests
391-
run: yarn test ${{ matrix.package.cmd }}
392-
working-directory: v5
393-
permissions:
394-
id-token: write
395297
jestTestsDdbOs:
396298
needs:
397299
- constants
@@ -700,224 +602,6 @@ jobs:
700602
run: yarn cy:run --browser chrome --spec "${{ matrix.cypress-folder }}"
701603
working-directory: v5
702604
runs-on: ubuntu-latest
703-
e2eTestsDdb-es-constants:
704-
name: Constants - DDB-ES
705-
needs:
706-
- build
707-
outputs:
708-
cypress-folders: ${{ steps.list-cypress-folders.outputs.cypress-folders }}
709-
pulumi-backend-url: ${{ steps.pulumi-backend-url.outputs.pulumi-backend-url }}
710-
steps:
711-
- uses: actions/setup-node@v4
712-
with:
713-
node-version: 22
714-
- uses: actions/checkout@v4
715-
- name: List Cypress tests folders
716-
id: list-cypress-folders
717-
run: >-
718-
echo "cypress-folders=$(node scripts/listCypressTestsFolders.js)" >>
719-
$GITHUB_OUTPUT
720-
- name: Get Pulumi backend URL
721-
id: get-pulumi-backend-url
722-
run: >-
723-
echo "pulumi-backend-url=${{ secrets.WEBINY_PULUMI_BACKEND }}${{
724-
github.run_id }}_ddb-es" >> $GITHUB_OUTPUT
725-
runs-on: ubuntu-latest
726-
env:
727-
NODE_OPTIONS: '--max_old_space_size=4096'
728-
YARN_ENABLE_IMMUTABLE_INSTALLS: false
729-
e2eTestsDdb-es-setup:
730-
needs:
731-
- constants
732-
- build
733-
- e2eTestsDdb-es-constants
734-
name: E2E (DDB-ES) - Project setup
735-
outputs:
736-
cypress-config: ${{ steps.save-cypress-config.outputs.cypress-config }}
737-
environment: next
738-
env:
739-
NODE_OPTIONS: '--max_old_space_size=4096'
740-
YARN_ENABLE_IMMUTABLE_INSTALLS: 'false'
741-
CYPRESS_MAILOSAUR_API_KEY: ${{ secrets.CYPRESS_MAILOSAUR_API_KEY }}
742-
PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }}
743-
PULUMI_SECRETS_PROVIDER: ${{ secrets.PULUMI_SECRETS_PROVIDER }}
744-
WEBINY_PULUMI_BACKEND: ${{ needs.e2eTestsDdb-es-constants.outputs.pulumi-backend-url }}
745-
AWS_ELASTIC_SEARCH_DOMAIN_NAME: ${{ secrets.AWS_ELASTIC_SEARCH_DOMAIN_NAME }}
746-
ELASTIC_SEARCH_ENDPOINT: ${{ secrets.ELASTIC_SEARCH_ENDPOINT }}
747-
ELASTIC_SEARCH_INDEX_PREFIX: ${{ github.run_id }}_
748-
steps:
749-
- uses: actions/setup-node@v4
750-
with:
751-
node-version: 22
752-
- name: Configure AWS Credentials
753-
uses: aws-actions/configure-aws-credentials@v4
754-
with:
755-
role-to-assume: arn:aws:iam::726952677045:role/GitHubActionsWebinyJs
756-
aws-region: eu-central-1
757-
- uses: actions/checkout@v4
758-
with:
759-
fetch-depth: 0
760-
path: v5
761-
- uses: actions/cache@v4
762-
with:
763-
path: v5/.yarn/cache
764-
key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
765-
- uses: actions/cache@v4
766-
with:
767-
path: v5/.webiny/cached-packages
768-
key: ${{ needs.constants.outputs.run-cache-key }}
769-
- name: Install dependencies
770-
run: yarn --immutable
771-
working-directory: v5
772-
- name: Build packages
773-
run: yarn build:quick
774-
working-directory: v5
775-
- name: Start Verdaccio local server
776-
working-directory: v5
777-
run: >-
778-
yarn add pm2 verdaccio && npx pm2 start verdaccio -- -c
779-
.verdaccio.yaml
780-
- name: Configure NPM to use local registry
781-
run: npm config set registry http://localhost:4873
782-
- name: Set git email
783-
run: git config --global user.email "webiny-bot@webiny.com"
784-
- name: Set git username
785-
run: git config --global user.name "webiny-bot"
786-
- name: Create ".npmrc" file in the project root, with a dummy auth token
787-
run: echo '//localhost:4873/:_authToken="dummy-auth-token"' > .npmrc
788-
working-directory: v5
789-
- name: Version and publish to Verdaccio
790-
run: yarn release --type=verdaccio
791-
working-directory: v5
792-
- name: Create verdaccio-files artifact
793-
uses: actions/upload-artifact@v4
794-
with:
795-
name: verdaccio-files-ddb-es
796-
retention-days: 1
797-
include-hidden-files: true
798-
path: |-
799-
v5/.verdaccio/
800-
v5/.verdaccio.yaml
801-
- name: Disable Webiny telemetry
802-
run: >
803-
mkdir ~/.webiny && echo '{ "id": "ci", "telemetry": false }' >
804-
~/.webiny/config
805-
- name: Create a new Webiny project
806-
run: >
807-
npx create-webiny-project@local-npm new-webiny-project --tag local-npm
808-
--no-interactive --assign-to-yarnrc
809-
'{"npmRegistryServer":"http://localhost:4873","unsafeHttpWhitelist":["localhost"]}'
810-
--template-options
811-
'{"region":"eu-central-1","storageOperations":"ddb-es"}'
812-
- name: Print CLI version
813-
working-directory: new-webiny-project
814-
run: yarn webiny --version
815-
- name: Create project-files artifact
816-
uses: actions/upload-artifact@v4
817-
with:
818-
name: project-files-ddb-es
819-
retention-days: 1
820-
include-hidden-files: true
821-
path: |-
822-
new-webiny-project/
823-
!new-webiny-project/node_modules/**/*
824-
!new-webiny-project/**/node_modules/**/*
825-
!new-webiny-project/.yarn/cache/**/*
826-
- name: Deploy Core
827-
working-directory: new-webiny-project
828-
run: yarn webiny deploy apps/core --env dev
829-
- name: Deploy API
830-
working-directory: new-webiny-project
831-
run: yarn webiny deploy apps/api --env dev
832-
- name: Deploy Admin Area
833-
working-directory: new-webiny-project
834-
run: yarn webiny deploy apps/admin --env dev
835-
- name: Deploy Website
836-
working-directory: new-webiny-project
837-
run: yarn webiny deploy apps/website --env dev
838-
- name: Deployment Summary
839-
run: >-
840-
node
841-
.github/workflows/wac/utils/runNodeScripts/printDeploymentSummary.js
842-
'../new-webiny-project' >> $GITHUB_STEP_SUMMARY
843-
working-directory: v5
844-
- name: Create Cypress config
845-
run: yarn setup-cypress --projectFolder ../new-webiny-project
846-
working-directory: v5
847-
- name: Save Cypress config
848-
id: save-cypress-config
849-
run: >-
850-
echo "cypress-config=$(cat cypress-tests/cypress.config.ts | tr -d
851-
'\t\n\r')" >> $GITHUB_OUTPUT
852-
working-directory: v5
853-
- name: Cypress - run installation wizard test
854-
run: >-
855-
yarn cy:run --browser chrome --spec
856-
"cypress/e2e/adminInstallation/**/*.cy.js"
857-
working-directory: v5
858-
runs-on: ubuntu-latest
859-
permissions:
860-
id-token: write
861-
e2eTestsDdb-es-cypress:
862-
name: >-
863-
${{ matrix.cypress-folder }} (ddb-es, ${{ matrix.os }}, Node v${{
864-
matrix.node }})
865-
needs:
866-
- constants
867-
- e2eTestsDdb-es-constants
868-
- e2eTestsDdb-es-setup
869-
strategy:
870-
fail-fast: false
871-
matrix:
872-
os:
873-
- ubuntu-latest
874-
node:
875-
- 22
876-
cypress-folder: >-
877-
${{ fromJson(needs.e2eTestsDdb-es-constants.outputs.cypress-folders)
878-
}}
879-
environment: next
880-
env:
881-
NODE_OPTIONS: '--max_old_space_size=4096'
882-
YARN_ENABLE_IMMUTABLE_INSTALLS: 'false'
883-
CYPRESS_MAILOSAUR_API_KEY: ${{ secrets.CYPRESS_MAILOSAUR_API_KEY }}
884-
PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }}
885-
PULUMI_SECRETS_PROVIDER: ${{ secrets.PULUMI_SECRETS_PROVIDER }}
886-
WEBINY_PULUMI_BACKEND: ${{ needs.e2eTestsDdb-es-constants.outputs.pulumi-backend-url }}
887-
AWS_ELASTIC_SEARCH_DOMAIN_NAME: ${{ secrets.AWS_ELASTIC_SEARCH_DOMAIN_NAME }}
888-
ELASTIC_SEARCH_ENDPOINT: ${{ secrets.ELASTIC_SEARCH_ENDPOINT }}
889-
ELASTIC_SEARCH_INDEX_PREFIX: ${{ github.run_id }}_
890-
steps:
891-
- uses: actions/setup-node@v4
892-
with:
893-
node-version: 22
894-
- uses: actions/checkout@v4
895-
with:
896-
path: v5
897-
- uses: actions/cache@v4
898-
with:
899-
path: v5/.yarn/cache
900-
key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
901-
- uses: actions/cache@v4
902-
with:
903-
path: v5/.webiny/cached-packages
904-
key: ${{ needs.constants.outputs.run-cache-key }}
905-
- name: Install dependencies
906-
run: yarn --immutable
907-
working-directory: v5
908-
- name: Build packages
909-
run: yarn build:quick
910-
working-directory: v5
911-
- name: Set up Cypress config
912-
run: >-
913-
echo '${{ needs.e2eTestsDdb-es-setup.outputs.cypress-config }}' >
914-
cypress-tests/cypress.config.ts
915-
working-directory: v5
916-
- name: Cypress - run "${{ matrix.cypress-folder }}" tests
917-
timeout-minutes: 40
918-
run: yarn cy:run --browser chrome --spec "${{ matrix.cypress-folder }}"
919-
working-directory: v5
920-
runs-on: ubuntu-latest
921605
e2eTestsDdb-os-constants:
922606
name: Constants - DDB-OS
923607
needs:

.github/workflows/wac/v5_push.wac.ts

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,7 @@ const createCypressJobs = (dbSetup: string) => {
6565
YARN_ENABLE_IMMUTABLE_INSTALLS: "false"
6666
};
6767

68-
if (dbSetup === "ddb-es") {
69-
env["AWS_ELASTIC_SEARCH_DOMAIN_NAME"] = "${{ secrets.AWS_ELASTIC_SEARCH_DOMAIN_NAME }}";
70-
env["ELASTIC_SEARCH_ENDPOINT"] = "${{ secrets.ELASTIC_SEARCH_ENDPOINT }}";
71-
env["ELASTIC_SEARCH_INDEX_PREFIX"] = "${{ github.run_id }}_";
72-
} else if (dbSetup === "ddb-os") {
68+
if (dbSetup === "ddb-os") {
7369
// We still use the same environment variables as for "ddb-es" setup, it's
7470
// just that the values are read from different secrets.
7571
env["AWS_ELASTIC_SEARCH_DOMAIN_NAME"] = "${{ secrets.AWS_OPEN_SEARCH_DOMAIN_NAME }}";
@@ -224,11 +220,7 @@ const createJestTestsJob = (storage: string | null) => {
224220
const env: Record<string, string> = { AWS_REGION };
225221

226222
if (storage) {
227-
if (storage === "ddb-es") {
228-
env["AWS_ELASTIC_SEARCH_DOMAIN_NAME"] = "${{ secrets.AWS_ELASTIC_SEARCH_DOMAIN_NAME }}";
229-
env["ELASTIC_SEARCH_ENDPOINT"] = "${{ secrets.ELASTIC_SEARCH_ENDPOINT }}";
230-
env["ELASTIC_SEARCH_INDEX_PREFIX"] = "${{ matrix.package.id }}";
231-
} else if (storage === "ddb-os") {
223+
if (storage === "ddb-os") {
232224
// We still use the same environment variables as for "ddb-es" setup, it's
233225
// just that the values are read from different secrets.
234226
env["AWS_ELASTIC_SEARCH_DOMAIN_NAME"] = "${{ secrets.AWS_OPEN_SEARCH_DOMAIN_NAME }}";
@@ -252,7 +244,7 @@ const createJestTestsJob = (storage: string | null) => {
252244
},
253245
"runs-on": "${{ matrix.os }}",
254246
env,
255-
awsAuth: storage === "ddb-es" || storage === "ddb-os",
247+
awsAuth: storage === "ddb-os",
256248
checkout: { path: DIR_WEBINY_JS },
257249
steps: [
258250
...yarnCacheSteps,
@@ -333,7 +325,7 @@ export const v5_Push = createWorkflow({
333325
...installBuildSteps,
334326
{
335327
name: "Sync Dependencies Verification",
336-
run: "yarn verify-dependencies",
328+
run: "yarn webiny verify-dependencies",
337329
"working-directory": DIR_WEBINY_JS
338330
}
339331
]
@@ -360,10 +352,8 @@ export const v5_Push = createWorkflow({
360352
}),
361353
jestTestsNoStorage: createJestTestsJob(null),
362354
jestTestsDdb: createJestTestsJob("ddb"),
363-
jestTestsDdbEs: createJestTestsJob("ddb-es"),
364355
jestTestsDdbOs: createJestTestsJob("ddb-os"),
365356
...createCypressJobs("ddb"),
366-
...createCypressJobs("ddb-es"),
367357
...createCypressJobs("ddb-os")
368358
}
369359
});

0 commit comments

Comments
 (0)