Skip to content

Commit

Permalink
ci:jest jobs need build job
Browse files Browse the repository at this point in the history
  • Loading branch information
adrians5j committed Apr 3, 2024
1 parent f9334e3 commit b4c9873
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 42 deletions.
42 changes: 23 additions & 19 deletions .github/workflows/pushDev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
codeAnalysis:
name: Static code analysis
needs:
- init
- constants
- build
steps:
- uses: actions/setup-node@v4
Expand Down Expand Up @@ -344,7 +344,7 @@ jobs:
run: yarn test ${{ matrix.package.cmd }}
permissions:
id-token: write
e2eTestsDdb-init:
e2eTestsDdb-constants:
name: Constants - DDB
needs: constants
outputs:
Expand Down Expand Up @@ -372,7 +372,7 @@ jobs:
e2eTestsDdb-setup:
needs:
- build
- e2eTestsDdb-init
- e2eTestsDdb-constants
name: E2E (DDB) - Project setup
outputs:
cypress-config: ${{ steps.save-cypress-config.outputs.cypress-config }}
Expand All @@ -383,7 +383,7 @@ jobs:
CYPRESS_MAILOSAUR_API_KEY: ${{ secrets.CYPRESS_MAILOSAUR_API_KEY }}
PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }}
PULUMI_SECRETS_PROVIDER: ${{ secrets.PULUMI_SECRETS_PROVIDER }}
WEBINY_PULUMI_BACKEND: ${{ needs.e2eTestsDdb-init.outputs.pulumi-backend-url }}
WEBINY_PULUMI_BACKEND: ${{ needs.e2eTestsDdb-constants.outputs.pulumi-backend-url }}
steps:
- uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -496,7 +496,7 @@ jobs:
${{ matrix.cypress-folder }} (ddb, ${{ matrix.os }}, Node v${{ matrix.node
}})
needs:
- e2eTestsDdb-init
- e2eTestsDdb-constants
- e2eTestsDdb-setup
strategy:
fail-fast: false
Expand All @@ -505,15 +505,15 @@ jobs:
- ubuntu-latest
node:
- 18
cypress-folder: ${{ fromJson(needs.e2eTestsDdb-init.outputs.cypress-folders) }}
cypress-folder: ${{ fromJson(needs.e2eTestsDdb-constants.outputs.cypress-folders) }}
environment: next
env:
NODE_OPTIONS: '--max_old_space_size=4096'
YARN_ENABLE_IMMUTABLE_INSTALLS: 'false'
CYPRESS_MAILOSAUR_API_KEY: ${{ secrets.CYPRESS_MAILOSAUR_API_KEY }}
PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }}
PULUMI_SECRETS_PROVIDER: ${{ secrets.PULUMI_SECRETS_PROVIDER }}
WEBINY_PULUMI_BACKEND: ${{ needs.e2eTestsDdb-init.outputs.pulumi-backend-url }}
WEBINY_PULUMI_BACKEND: ${{ needs.e2eTestsDdb-constants.outputs.pulumi-backend-url }}
steps:
- uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -541,7 +541,7 @@ jobs:
timeout-minutes: 40
run: yarn cy:run --browser chrome --spec "${{ matrix.cypress-folder }}"
runs-on: ubuntu-latest
e2eTestsDdb-es-init:
e2eTestsDdb-es-constants:
name: Constants - DDB-ES
needs: constants
outputs:
Expand Down Expand Up @@ -569,7 +569,7 @@ jobs:
e2eTestsDdb-es-setup:
needs:
- build
- e2eTestsDdb-es-init
- e2eTestsDdb-es-constants
name: E2E (DDB-ES) - Project setup
outputs:
cypress-config: ${{ steps.save-cypress-config.outputs.cypress-config }}
Expand All @@ -580,7 +580,7 @@ jobs:
CYPRESS_MAILOSAUR_API_KEY: ${{ secrets.CYPRESS_MAILOSAUR_API_KEY }}
PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }}
PULUMI_SECRETS_PROVIDER: ${{ secrets.PULUMI_SECRETS_PROVIDER }}
WEBINY_PULUMI_BACKEND: ${{ needs.e2eTestsDdb-es-init.outputs.pulumi-backend-url }}
WEBINY_PULUMI_BACKEND: ${{ needs.e2eTestsDdb-es-constants.outputs.pulumi-backend-url }}
AWS_ELASTIC_SEARCH_DOMAIN_NAME: ${{ secrets.AWS_ELASTIC_SEARCH_DOMAIN_NAME }}
ELASTIC_SEARCH_ENDPOINT: ${{ secrets.ELASTIC_SEARCH_ENDPOINT }}
ELASTIC_SEARCH_INDEX_PREFIX: ${{ github.run_id }}_
Expand Down Expand Up @@ -696,7 +696,7 @@ jobs:
${{ matrix.cypress-folder }} (ddb-es, ${{ matrix.os }}, Node v${{
matrix.node }})
needs:
- e2eTestsDdb-es-init
- e2eTestsDdb-es-constants
- e2eTestsDdb-es-setup
strategy:
fail-fast: false
Expand All @@ -705,15 +705,17 @@ jobs:
- ubuntu-latest
node:
- 18
cypress-folder: ${{ fromJson(needs.e2eTestsDdb-es-init.outputs.cypress-folders) }}
cypress-folder: >-
${{ fromJson(needs.e2eTestsDdb-es-constants.outputs.cypress-folders)
}}
environment: next
env:
NODE_OPTIONS: '--max_old_space_size=4096'
YARN_ENABLE_IMMUTABLE_INSTALLS: 'false'
CYPRESS_MAILOSAUR_API_KEY: ${{ secrets.CYPRESS_MAILOSAUR_API_KEY }}
PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }}
PULUMI_SECRETS_PROVIDER: ${{ secrets.PULUMI_SECRETS_PROVIDER }}
WEBINY_PULUMI_BACKEND: ${{ needs.e2eTestsDdb-es-init.outputs.pulumi-backend-url }}
WEBINY_PULUMI_BACKEND: ${{ needs.e2eTestsDdb-es-constants.outputs.pulumi-backend-url }}
AWS_ELASTIC_SEARCH_DOMAIN_NAME: ${{ secrets.AWS_ELASTIC_SEARCH_DOMAIN_NAME }}
ELASTIC_SEARCH_ENDPOINT: ${{ secrets.ELASTIC_SEARCH_ENDPOINT }}
ELASTIC_SEARCH_INDEX_PREFIX: ${{ github.run_id }}_
Expand Down Expand Up @@ -744,7 +746,7 @@ jobs:
timeout-minutes: 40
run: yarn cy:run --browser chrome --spec "${{ matrix.cypress-folder }}"
runs-on: ubuntu-latest
e2eTestsDdb-os-init:
e2eTestsDdb-os-constants:
name: Constants - DDB-OS
needs: constants
outputs:
Expand Down Expand Up @@ -772,7 +774,7 @@ jobs:
e2eTestsDdb-os-setup:
needs:
- build
- e2eTestsDdb-os-init
- e2eTestsDdb-os-constants
name: E2E (DDB-OS) - Project setup
outputs:
cypress-config: ${{ steps.save-cypress-config.outputs.cypress-config }}
Expand All @@ -783,7 +785,7 @@ jobs:
CYPRESS_MAILOSAUR_API_KEY: ${{ secrets.CYPRESS_MAILOSAUR_API_KEY }}
PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }}
PULUMI_SECRETS_PROVIDER: ${{ secrets.PULUMI_SECRETS_PROVIDER }}
WEBINY_PULUMI_BACKEND: ${{ needs.e2eTestsDdb-os-init.outputs.pulumi-backend-url }}
WEBINY_PULUMI_BACKEND: ${{ needs.e2eTestsDdb-os-constants.outputs.pulumi-backend-url }}
AWS_ELASTIC_SEARCH_DOMAIN_NAME: ${{ secrets.AWS_OPEN_SEARCH_DOMAIN_NAME }}
ELASTIC_SEARCH_ENDPOINT: ${{ secrets.OPEN_SEARCH_ENDPOINT }}
ELASTIC_SEARCH_INDEX_PREFIX: ${{ github.run_id }}_
Expand Down Expand Up @@ -899,7 +901,7 @@ jobs:
${{ matrix.cypress-folder }} (ddb-os, ${{ matrix.os }}, Node v${{
matrix.node }})
needs:
- e2eTestsDdb-os-init
- e2eTestsDdb-os-constants
- e2eTestsDdb-os-setup
strategy:
fail-fast: false
Expand All @@ -908,15 +910,17 @@ jobs:
- ubuntu-latest
node:
- 18
cypress-folder: ${{ fromJson(needs.e2eTestsDdb-os-init.outputs.cypress-folders) }}
cypress-folder: >-
${{ fromJson(needs.e2eTestsDdb-os-constants.outputs.cypress-folders)
}}
environment: next
env:
NODE_OPTIONS: '--max_old_space_size=4096'
YARN_ENABLE_IMMUTABLE_INSTALLS: 'false'
CYPRESS_MAILOSAUR_API_KEY: ${{ secrets.CYPRESS_MAILOSAUR_API_KEY }}
PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }}
PULUMI_SECRETS_PROVIDER: ${{ secrets.PULUMI_SECRETS_PROVIDER }}
WEBINY_PULUMI_BACKEND: ${{ needs.e2eTestsDdb-os-init.outputs.pulumi-backend-url }}
WEBINY_PULUMI_BACKEND: ${{ needs.e2eTestsDdb-os-constants.outputs.pulumi-backend-url }}
AWS_ELASTIC_SEARCH_DOMAIN_NAME: ${{ secrets.AWS_OPEN_SEARCH_DOMAIN_NAME }}
ELASTIC_SEARCH_ENDPOINT: ${{ secrets.OPEN_SEARCH_ENDPOINT }}
ELASTIC_SEARCH_INDEX_PREFIX: ${{ github.run_id }}_
Expand Down
42 changes: 23 additions & 19 deletions .github/workflows/pushNext.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
codeAnalysis:
name: Static code analysis
needs:
- init
- constants
- build
steps:
- uses: actions/setup-node@v4
Expand Down Expand Up @@ -344,7 +344,7 @@ jobs:
run: yarn test ${{ matrix.package.cmd }}
permissions:
id-token: write
e2eTestsDdb-init:
e2eTestsDdb-constants:
name: Constants - DDB
needs: constants
outputs:
Expand Down Expand Up @@ -372,7 +372,7 @@ jobs:
e2eTestsDdb-setup:
needs:
- build
- e2eTestsDdb-init
- e2eTestsDdb-constants
name: E2E (DDB) - Project setup
outputs:
cypress-config: ${{ steps.save-cypress-config.outputs.cypress-config }}
Expand All @@ -383,7 +383,7 @@ jobs:
CYPRESS_MAILOSAUR_API_KEY: ${{ secrets.CYPRESS_MAILOSAUR_API_KEY }}
PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }}
PULUMI_SECRETS_PROVIDER: ${{ secrets.PULUMI_SECRETS_PROVIDER }}
WEBINY_PULUMI_BACKEND: ${{ needs.e2eTestsDdb-init.outputs.pulumi-backend-url }}
WEBINY_PULUMI_BACKEND: ${{ needs.e2eTestsDdb-constants.outputs.pulumi-backend-url }}
steps:
- uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -496,7 +496,7 @@ jobs:
${{ matrix.cypress-folder }} (ddb, ${{ matrix.os }}, Node v${{ matrix.node
}})
needs:
- e2eTestsDdb-init
- e2eTestsDdb-constants
- e2eTestsDdb-setup
strategy:
fail-fast: false
Expand All @@ -505,15 +505,15 @@ jobs:
- ubuntu-latest
node:
- 18
cypress-folder: ${{ fromJson(needs.e2eTestsDdb-init.outputs.cypress-folders) }}
cypress-folder: ${{ fromJson(needs.e2eTestsDdb-constants.outputs.cypress-folders) }}
environment: next
env:
NODE_OPTIONS: '--max_old_space_size=4096'
YARN_ENABLE_IMMUTABLE_INSTALLS: 'false'
CYPRESS_MAILOSAUR_API_KEY: ${{ secrets.CYPRESS_MAILOSAUR_API_KEY }}
PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }}
PULUMI_SECRETS_PROVIDER: ${{ secrets.PULUMI_SECRETS_PROVIDER }}
WEBINY_PULUMI_BACKEND: ${{ needs.e2eTestsDdb-init.outputs.pulumi-backend-url }}
WEBINY_PULUMI_BACKEND: ${{ needs.e2eTestsDdb-constants.outputs.pulumi-backend-url }}
steps:
- uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -541,7 +541,7 @@ jobs:
timeout-minutes: 40
run: yarn cy:run --browser chrome --spec "${{ matrix.cypress-folder }}"
runs-on: ubuntu-latest
e2eTestsDdb-es-init:
e2eTestsDdb-es-constants:
name: Constants - DDB-ES
needs: constants
outputs:
Expand Down Expand Up @@ -569,7 +569,7 @@ jobs:
e2eTestsDdb-es-setup:
needs:
- build
- e2eTestsDdb-es-init
- e2eTestsDdb-es-constants
name: E2E (DDB-ES) - Project setup
outputs:
cypress-config: ${{ steps.save-cypress-config.outputs.cypress-config }}
Expand All @@ -580,7 +580,7 @@ jobs:
CYPRESS_MAILOSAUR_API_KEY: ${{ secrets.CYPRESS_MAILOSAUR_API_KEY }}
PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }}
PULUMI_SECRETS_PROVIDER: ${{ secrets.PULUMI_SECRETS_PROVIDER }}
WEBINY_PULUMI_BACKEND: ${{ needs.e2eTestsDdb-es-init.outputs.pulumi-backend-url }}
WEBINY_PULUMI_BACKEND: ${{ needs.e2eTestsDdb-es-constants.outputs.pulumi-backend-url }}
AWS_ELASTIC_SEARCH_DOMAIN_NAME: ${{ secrets.AWS_ELASTIC_SEARCH_DOMAIN_NAME }}
ELASTIC_SEARCH_ENDPOINT: ${{ secrets.ELASTIC_SEARCH_ENDPOINT }}
ELASTIC_SEARCH_INDEX_PREFIX: ${{ github.run_id }}_
Expand Down Expand Up @@ -696,7 +696,7 @@ jobs:
${{ matrix.cypress-folder }} (ddb-es, ${{ matrix.os }}, Node v${{
matrix.node }})
needs:
- e2eTestsDdb-es-init
- e2eTestsDdb-es-constants
- e2eTestsDdb-es-setup
strategy:
fail-fast: false
Expand All @@ -705,15 +705,17 @@ jobs:
- ubuntu-latest
node:
- 18
cypress-folder: ${{ fromJson(needs.e2eTestsDdb-es-init.outputs.cypress-folders) }}
cypress-folder: >-
${{ fromJson(needs.e2eTestsDdb-es-constants.outputs.cypress-folders)
}}
environment: next
env:
NODE_OPTIONS: '--max_old_space_size=4096'
YARN_ENABLE_IMMUTABLE_INSTALLS: 'false'
CYPRESS_MAILOSAUR_API_KEY: ${{ secrets.CYPRESS_MAILOSAUR_API_KEY }}
PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }}
PULUMI_SECRETS_PROVIDER: ${{ secrets.PULUMI_SECRETS_PROVIDER }}
WEBINY_PULUMI_BACKEND: ${{ needs.e2eTestsDdb-es-init.outputs.pulumi-backend-url }}
WEBINY_PULUMI_BACKEND: ${{ needs.e2eTestsDdb-es-constants.outputs.pulumi-backend-url }}
AWS_ELASTIC_SEARCH_DOMAIN_NAME: ${{ secrets.AWS_ELASTIC_SEARCH_DOMAIN_NAME }}
ELASTIC_SEARCH_ENDPOINT: ${{ secrets.ELASTIC_SEARCH_ENDPOINT }}
ELASTIC_SEARCH_INDEX_PREFIX: ${{ github.run_id }}_
Expand Down Expand Up @@ -744,7 +746,7 @@ jobs:
timeout-minutes: 40
run: yarn cy:run --browser chrome --spec "${{ matrix.cypress-folder }}"
runs-on: ubuntu-latest
e2eTestsDdb-os-init:
e2eTestsDdb-os-constants:
name: Constants - DDB-OS
needs: constants
outputs:
Expand Down Expand Up @@ -772,7 +774,7 @@ jobs:
e2eTestsDdb-os-setup:
needs:
- build
- e2eTestsDdb-os-init
- e2eTestsDdb-os-constants
name: E2E (DDB-OS) - Project setup
outputs:
cypress-config: ${{ steps.save-cypress-config.outputs.cypress-config }}
Expand All @@ -783,7 +785,7 @@ jobs:
CYPRESS_MAILOSAUR_API_KEY: ${{ secrets.CYPRESS_MAILOSAUR_API_KEY }}
PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }}
PULUMI_SECRETS_PROVIDER: ${{ secrets.PULUMI_SECRETS_PROVIDER }}
WEBINY_PULUMI_BACKEND: ${{ needs.e2eTestsDdb-os-init.outputs.pulumi-backend-url }}
WEBINY_PULUMI_BACKEND: ${{ needs.e2eTestsDdb-os-constants.outputs.pulumi-backend-url }}
AWS_ELASTIC_SEARCH_DOMAIN_NAME: ${{ secrets.AWS_OPEN_SEARCH_DOMAIN_NAME }}
ELASTIC_SEARCH_ENDPOINT: ${{ secrets.OPEN_SEARCH_ENDPOINT }}
ELASTIC_SEARCH_INDEX_PREFIX: ${{ github.run_id }}_
Expand Down Expand Up @@ -899,7 +901,7 @@ jobs:
${{ matrix.cypress-folder }} (ddb-os, ${{ matrix.os }}, Node v${{
matrix.node }})
needs:
- e2eTestsDdb-os-init
- e2eTestsDdb-os-constants
- e2eTestsDdb-os-setup
strategy:
fail-fast: false
Expand All @@ -908,15 +910,17 @@ jobs:
- ubuntu-latest
node:
- 18
cypress-folder: ${{ fromJson(needs.e2eTestsDdb-os-init.outputs.cypress-folders) }}
cypress-folder: >-
${{ fromJson(needs.e2eTestsDdb-os-constants.outputs.cypress-folders)
}}
environment: next
env:
NODE_OPTIONS: '--max_old_space_size=4096'
YARN_ENABLE_IMMUTABLE_INSTALLS: 'false'
CYPRESS_MAILOSAUR_API_KEY: ${{ secrets.CYPRESS_MAILOSAUR_API_KEY }}
PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }}
PULUMI_SECRETS_PROVIDER: ${{ secrets.PULUMI_SECRETS_PROVIDER }}
WEBINY_PULUMI_BACKEND: ${{ needs.e2eTestsDdb-os-init.outputs.pulumi-backend-url }}
WEBINY_PULUMI_BACKEND: ${{ needs.e2eTestsDdb-os-constants.outputs.pulumi-backend-url }}
AWS_ELASTIC_SEARCH_DOMAIN_NAME: ${{ secrets.AWS_OPEN_SEARCH_DOMAIN_NAME }}
ELASTIC_SEARCH_ENDPOINT: ${{ secrets.OPEN_SEARCH_ENDPOINT }}
ELASTIC_SEARCH_INDEX_PREFIX: ${{ github.run_id }}_
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/wac/push.wac.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ const createCypressJobs = (dbSetup: string) => {
const ucFirstDbSetup = dbSetup.charAt(0).toUpperCase() + dbSetup.slice(1);

const jobNames = {
constants: `e2eTests${ucFirstDbSetup}-init`,
constants: `e2eTests${ucFirstDbSetup}-constants`,
projectSetup: `e2eTests${ucFirstDbSetup}-setup`,
cypressTests: `e2eTests${ucFirstDbSetup}-cypress`
};

const initJob: NormalJob = createJob({
const constantsJob: NormalJob = createJob({
name: `Constants - ${dbSetup.toUpperCase()}`,
needs: "constants",
outputs: {
Expand Down Expand Up @@ -240,7 +240,7 @@ const createCypressJobs = (dbSetup: string) => {
});

return {
[jobNames.constants]: initJob,
[jobNames.constants]: constantsJob,
[jobNames.projectSetup]: projectSetupJob,
[jobNames.cypressTests]: cypressTestsJob
};
Expand Down Expand Up @@ -341,7 +341,7 @@ const createPushWorkflow = (branchName: string) => {
}),
codeAnalysis: createJob({
name: "Static code analysis",
needs: ["init", "build"],
needs: ["constants", "build"],
steps: [
...createYarnCacheSteps(),
...createBuildRunCacheSteps(),
Expand Down

0 comments on commit b4c9873

Please sign in to comment.