# This file was automatically generated by github-actions-wac. # DO NOT MODIFY IT BY HAND. Instead, modify the source *.wac.ts file(s) # and run "github-actions-wac build" (or "ghawac build") to regenerate this file. # For more information, run "github-actions-wac --help". name: Push 'on': push: branches: - dev - next - release/* concurrency: group: >- push-${{ startsWith(github.ref, 'refs/heads/release/') && github.run_id || github.ref }} cancel-in-progress: true jobs: constants: name: Create constants outputs: global-cache-key: ${{ steps.global-cache-key.outputs.global-cache-key }} run-cache-key: ${{ steps.run-cache-key.outputs.run-cache-key }} steps: - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 with: node-version: 24 - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 - name: Create global cache key id: global-cache-key run: >- echo "global-cache-key=${{ github.ref_name }}-${{ runner.os }}-$(/bin/date -u "+%m%d")-${{ vars.RANDOM_CACHE_KEY_SUFFIX }}" >> $GITHUB_OUTPUT - name: Create workflow run cache key id: run-cache-key run: >- echo "run-cache-key=${{ github.run_id }}-${{ github.run_attempt }}-${{ vars.RANDOM_CACHE_KEY_SUFFIX }}" >> $GITHUB_OUTPUT runs-on: ubuntu-latest env: NODE_OPTIONS: '--max_old_space_size=4096' YARN_ENABLE_IMMUTABLE_INSTALLS: false permissions: contents: read actions: write build: name: Build needs: constants runs-on: ubuntu-latest steps: - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 with: node-version: 24 - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 with: path: v6 - name: Resolve Yarn cache folder id: yarn-cache-folder working-directory: v6 run: echo "path=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: ${{ steps.yarn-cache-folder.outputs.path }} key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} restore-keys: yarn-${{ runner.os }}- - uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: v6/.webiny/cached-packages key: ${{ needs.constants.outputs.global-cache-key }} - name: Install dependencies run: yarn --immutable working-directory: v6 - name: Build packages run: yarn build working-directory: v6 - uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: v6/.webiny/cached-packages key: ${{ needs.constants.outputs.run-cache-key }} env: NODE_OPTIONS: '--max_old_space_size=4096' YARN_ENABLE_IMMUTABLE_INSTALLS: false permissions: contents: read actions: write codeAnalysis: name: Static code analysis needs: - constants - build steps: - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 with: node-version: 24 - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 with: path: v6 - name: Resolve Yarn cache folder id: yarn-cache-folder working-directory: v6 run: echo "path=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: ${{ steps.yarn-cache-folder.outputs.path }} key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} restore-keys: yarn-${{ runner.os }}- - uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: v6/.webiny/cached-packages key: ${{ needs.constants.outputs.run-cache-key }} - name: Install dependencies run: yarn --immutable working-directory: v6 - name: Check code formatting run: yarn format:check working-directory: v6 - name: Check dependencies run: yarn adio working-directory: v6 - name: Check TS configs run: yarn check-ts-configs working-directory: v6 - name: Lint run: yarn lint working-directory: v6 - name: Check Package Node Modules run: yarn check:node-modules:ci working-directory: v6 runs-on: ubuntu-latest env: NODE_OPTIONS: '--max_old_space_size=4096' YARN_ENABLE_IMMUTABLE_INSTALLS: false permissions: contents: read actions: write staticCodeAnalysisVerifyDependencies: needs: - constants - build name: Static code analysis (verify dependencies) steps: - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 with: node-version: 24 - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 with: path: v6 - name: Resolve Yarn cache folder id: yarn-cache-folder working-directory: v6 run: echo "path=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: ${{ steps.yarn-cache-folder.outputs.path }} key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} restore-keys: yarn-${{ runner.os }}- - uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: v6/.webiny/cached-packages key: ${{ needs.constants.outputs.run-cache-key }} - name: Install dependencies run: yarn --immutable working-directory: v6 - name: Build packages run: yarn build working-directory: v6 - name: Sync Dependencies Verification run: yarn verify-dependencies working-directory: v6 runs-on: ubuntu-latest env: NODE_OPTIONS: '--max_old_space_size=4096' YARN_ENABLE_IMMUTABLE_INSTALLS: false permissions: contents: read actions: write staticCodeAnalysisTs: name: Static code analysis (TypeScript) runs-on: ubuntu-latest steps: - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 with: node-version: 24 - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 with: path: v6 - name: Resolve Yarn cache folder id: yarn-cache-folder working-directory: v6 run: echo "path=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: ${{ steps.yarn-cache-folder.outputs.path }} key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} restore-keys: yarn-${{ runner.os }}- - name: Install dependencies run: yarn --immutable working-directory: v6 - name: Check types for E2E tests run: yarn e2e:ts working-directory: v6 env: NODE_OPTIONS: '--max_old_space_size=4096' YARN_ENABLE_IMMUTABLE_INSTALLS: false permissions: contents: read actions: write vitest-constants: needs: - build name: Vitest (No storage) - Constants outputs: vitest-test-commands: ${{ steps.list-vitest-test-commands.outputs.vitest-test-commands }} steps: - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 with: node-version: 24 - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 with: path: v6 - id: list-vitest-test-commands name: List Vitest Test Commands working-directory: v6 run: >- echo "vitest-test-commands=$(node .github/workflows/wac/utils/runNodeScripts/listVitestTestCommands.js '[""]')" >> "$GITHUB_OUTPUT" runs-on: ubuntu-latest env: NODE_OPTIONS: '--max_old_space_size=4096' YARN_ENABLE_IMMUTABLE_INSTALLS: false permissions: contents: read actions: write vitest-run: needs: - constants - vitest-constants name: ${{ matrix.testCommand.title }} strategy: fail-fast: false matrix: os: - ubuntu-latest node: - 24 testCommand: ${{ fromJSON(needs.vitest-constants.outputs.vitest-test-commands) }} runs-on: ${{ matrix.os }} env: NODE_OPTIONS: '--max_old_space_size=4096' YARN_ENABLE_IMMUTABLE_INSTALLS: false AWS_REGION: eu-central-1 WEBINY_TEST_REDIS_URL: redis://localhost:6379 services: valkey: image: valkey/valkey:8 ports: - '6379:6379' options: >- --health-cmd "valkey-cli ping" --health-interval 2s --health-timeout 2s --health-retries 15 steps: - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 with: node-version: 24 - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 with: path: v6 - name: Resolve Yarn cache folder id: yarn-cache-folder working-directory: v6 run: echo "path=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: ${{ steps.yarn-cache-folder.outputs.path }} key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} restore-keys: yarn-${{ runner.os }}- - uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: v6/.webiny/cached-packages key: ${{ needs.constants.outputs.run-cache-key }} - name: Install dependencies run: yarn --immutable working-directory: v6 - name: Build packages run: yarn build working-directory: v6 - name: Run tests run: ${{ matrix.testCommand.cmd }} working-directory: v6 permissions: contents: read actions: write vitest-ddb-constants: needs: - build name: Vitest (DDB) - Constants outputs: vitest-test-commands: ${{ steps.list-vitest-test-commands.outputs.vitest-test-commands }} steps: - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 with: node-version: 24 - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 with: path: v6 - id: list-vitest-test-commands name: List Vitest Test Commands working-directory: v6 run: >- echo "vitest-test-commands=$(node .github/workflows/wac/utils/runNodeScripts/listVitestTestCommands.js '["ddb"]')" >> "$GITHUB_OUTPUT" runs-on: ubuntu-latest env: NODE_OPTIONS: '--max_old_space_size=4096' YARN_ENABLE_IMMUTABLE_INSTALLS: false permissions: contents: read actions: write vitest-ddb-run: needs: - constants - vitest-ddb-constants name: ${{ matrix.testCommand.title }} strategy: fail-fast: false matrix: os: - ubuntu-latest node: - 24 testCommand: >- ${{ fromJSON(needs.vitest-ddb-constants.outputs.vitest-test-commands) }} runs-on: ${{ matrix.os }} env: NODE_OPTIONS: '--max_old_space_size=4096' YARN_ENABLE_IMMUTABLE_INSTALLS: false AWS_REGION: eu-central-1 WEBINY_STORAGE: ddb steps: - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 with: node-version: 24 - name: Configure AWS Credentials uses: >- aws-actions/configure-aws-credentials@8df5847569e6427dd6c4fb1cf565c83acfa8afa7 with: role-to-assume: arn:aws:iam::726952677045:role/GitHubActionsWebinyJs aws-region: eu-central-1 - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 with: path: v6 - name: Resolve Yarn cache folder id: yarn-cache-folder working-directory: v6 run: echo "path=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: ${{ steps.yarn-cache-folder.outputs.path }} key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} restore-keys: yarn-${{ runner.os }}- - uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: v6/.webiny/cached-packages key: ${{ needs.constants.outputs.run-cache-key }} - name: Install dependencies run: yarn --immutable working-directory: v6 - name: Build packages run: yarn build working-directory: v6 - name: Run tests run: ${{ matrix.testCommand.cmd }} working-directory: v6 permissions: contents: read actions: write id-token: write vitest-ddb-os-constants: needs: - build name: Vitest (DDB+OS) - Constants outputs: vitest-test-commands: ${{ steps.list-vitest-test-commands.outputs.vitest-test-commands }} steps: - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 with: node-version: 24 - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 with: path: v6 - id: list-vitest-test-commands name: List Vitest Test Commands working-directory: v6 run: >- echo "vitest-test-commands=$(node .github/workflows/wac/utils/runNodeScripts/listVitestTestCommands.js '["ddb-os,ddb"]')" >> "$GITHUB_OUTPUT" runs-on: ubuntu-latest env: NODE_OPTIONS: '--max_old_space_size=4096' YARN_ENABLE_IMMUTABLE_INSTALLS: false permissions: contents: read actions: write vitest-ddb-os-run: needs: - constants - vitest-ddb-os-constants name: ${{ matrix.testCommand.title }} strategy: fail-fast: false matrix: os: - ubuntu-latest node: - 24 testCommand: >- ${{ fromJSON(needs.vitest-ddb-os-constants.outputs.vitest-test-commands) }} runs-on: ${{ matrix.os }} env: NODE_OPTIONS: '--max_old_space_size=4096' YARN_ENABLE_IMMUTABLE_INSTALLS: false AWS_REGION: eu-central-1 WEBINY_STORAGE: ddb-os,ddb services: opensearch: image: opensearchproject/opensearch:3.3.2 env: discovery.type: single-node DISABLE_SECURITY_PLUGIN: 'true' OPENSEARCH_JAVA_OPTS: '-Xms512m -Xmx512m' ports: - '9200:9200' steps: - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 with: node-version: 24 - name: Configure AWS Credentials uses: >- aws-actions/configure-aws-credentials@8df5847569e6427dd6c4fb1cf565c83acfa8afa7 with: role-to-assume: arn:aws:iam::726952677045:role/GitHubActionsWebinyJs aws-region: eu-central-1 - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 with: path: v6 - name: Resolve Yarn cache folder id: yarn-cache-folder working-directory: v6 run: echo "path=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: ${{ steps.yarn-cache-folder.outputs.path }} key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} restore-keys: yarn-${{ runner.os }}- - uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: v6/.webiny/cached-packages key: ${{ needs.constants.outputs.run-cache-key }} - name: Install dependencies run: yarn --immutable working-directory: v6 - name: Build packages run: yarn build working-directory: v6 - name: Wait for OpenSearch run: >- set -euo pipefail for i in $(seq 1 60); do if curl -sf "http://localhost:9200/_cluster/health?wait_for_status=yellow&timeout=5s" > /dev/null; then echo "OpenSearch is up:" curl -s http://localhost:9200 exit 0 fi sleep 5 done echo "::error::OpenSearch did not answer on localhost:9200 within 5 minutes." exit 1 - name: Run tests run: ${{ matrix.testCommand.cmd }} working-directory: v6 permissions: contents: read actions: write id-token: write vitest-sql-constants: needs: - build name: Vitest (SQL) - Constants outputs: vitest-test-commands: ${{ steps.list-vitest-test-commands.outputs.vitest-test-commands }} steps: - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 with: node-version: 24 - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 with: path: v6 - id: list-vitest-test-commands name: List Vitest Test Commands working-directory: v6 run: >- echo "vitest-test-commands=$(node .github/workflows/wac/utils/runNodeScripts/listVitestTestCommands.js '["sql"]')" >> "$GITHUB_OUTPUT" runs-on: ubuntu-latest env: NODE_OPTIONS: '--max_old_space_size=4096' YARN_ENABLE_IMMUTABLE_INSTALLS: false permissions: contents: read actions: write vitest-sql-run: needs: - constants - vitest-sql-constants name: ${{ matrix.testCommand.title }} strategy: fail-fast: false matrix: os: - ubuntu-latest node: - 24 testCommand: >- ${{ fromJSON(needs.vitest-sql-constants.outputs.vitest-test-commands) }} runs-on: ${{ matrix.os }} env: NODE_OPTIONS: '--max_old_space_size=4096' YARN_ENABLE_IMMUTABLE_INSTALLS: false AWS_REGION: eu-central-1 WEBINY_STORAGE: sql steps: - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 with: node-version: 24 - name: Configure AWS Credentials uses: >- aws-actions/configure-aws-credentials@8df5847569e6427dd6c4fb1cf565c83acfa8afa7 with: role-to-assume: arn:aws:iam::726952677045:role/GitHubActionsWebinyJs aws-region: eu-central-1 - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 with: path: v6 - name: Resolve Yarn cache folder id: yarn-cache-folder working-directory: v6 run: echo "path=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: ${{ steps.yarn-cache-folder.outputs.path }} key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} restore-keys: yarn-${{ runner.os }}- - uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: v6/.webiny/cached-packages key: ${{ needs.constants.outputs.run-cache-key }} - name: Install dependencies run: yarn --immutable working-directory: v6 - name: Build packages run: yarn build working-directory: v6 - name: Run tests run: ${{ matrix.testCommand.cmd }} working-directory: v6 permissions: contents: read actions: write id-token: write vitest-pg-constants: needs: - build name: Vitest (pg) - Constants outputs: vitest-test-commands: ${{ steps.list-vitest-test-commands.outputs.vitest-test-commands }} steps: - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 with: node-version: 24 - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 with: path: v6 - id: list-vitest-test-commands name: List Vitest Test Commands working-directory: v6 run: >- echo "vitest-test-commands=$(node .github/workflows/wac/utils/runNodeScripts/listVitestTestCommands.js '["pg,sql"]')" >> "$GITHUB_OUTPUT" runs-on: ubuntu-latest env: NODE_OPTIONS: '--max_old_space_size=4096' YARN_ENABLE_IMMUTABLE_INSTALLS: false permissions: contents: read actions: write vitest-pg-run: needs: - constants - vitest-pg-constants name: ${{ matrix.testCommand.title }} strategy: fail-fast: false matrix: os: - ubuntu-latest node: - 24 testCommand: >- ${{ fromJSON(needs.vitest-pg-constants.outputs.vitest-test-commands) }} runs-on: ${{ matrix.os }} env: NODE_OPTIONS: '--max_old_space_size=4096' YARN_ENABLE_IMMUTABLE_INSTALLS: false AWS_REGION: eu-central-1 WEBINY_STORAGE: pg,sql WEBINY_SQL_CLIENT: pglite steps: - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 with: node-version: 24 - name: Configure AWS Credentials uses: >- aws-actions/configure-aws-credentials@8df5847569e6427dd6c4fb1cf565c83acfa8afa7 with: role-to-assume: arn:aws:iam::726952677045:role/GitHubActionsWebinyJs aws-region: eu-central-1 - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 with: path: v6 - name: Resolve Yarn cache folder id: yarn-cache-folder working-directory: v6 run: echo "path=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: ${{ steps.yarn-cache-folder.outputs.path }} key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} restore-keys: yarn-${{ runner.os }}- - uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: v6/.webiny/cached-packages key: ${{ needs.constants.outputs.run-cache-key }} - name: Install dependencies run: yarn --immutable working-directory: v6 - name: Build packages run: yarn build working-directory: v6 - name: Run tests run: ${{ matrix.testCommand.cmd }} working-directory: v6 permissions: contents: read actions: write id-token: write e2eTests-ddb-setup: needs: - constants - build runs-on: ubuntu-latest name: E2E (DDB) - Project setup environment: next env: NODE_OPTIONS: '--max_old_space_size=4096' YARN_ENABLE_IMMUTABLE_INSTALLS: 'false' PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }} PULUMI_SECRETS_PROVIDER: ${{ secrets.PULUMI_SECRETS_PROVIDER }} WEBINY_INFRA_API_MAX_BUNDLE_SIZE: ${{ vars.WEBINY_INFRA_API_MAX_BUNDLE_SIZE }} BUG_REPORT_GITHUB_TOKEN: ${{ secrets.BUG_REPORT_GITHUB_TOKEN }} BUG_REPORT_REPOSITORY: ${{ vars.BUG_REPORT_REPOSITORY }} steps: - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 with: node-version: 24 - name: Configure AWS Credentials uses: >- aws-actions/configure-aws-credentials@8df5847569e6427dd6c4fb1cf565c83acfa8afa7 with: role-to-assume: arn:aws:iam::726952677045:role/GitHubActionsWebinyJs aws-region: eu-central-1 - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 with: fetch-depth: 0 path: v6 - name: Resolve Yarn cache folder id: yarn-cache-folder working-directory: v6 run: echo "path=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: ${{ steps.yarn-cache-folder.outputs.path }} key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} restore-keys: yarn-${{ runner.os }}- - uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: v6/.webiny/cached-packages key: ${{ needs.constants.outputs.run-cache-key }} - name: Install dependencies run: yarn --immutable working-directory: v6 - name: Build packages run: yarn build working-directory: v6 - name: Start Verdaccio local server working-directory: v6 run: yarn add pm2 && npx pm2 start verdaccio -- -c .verdaccio.yaml - name: Configure NPM to use local registry run: npm config set registry http://localhost:4873 - name: Set git email run: git config --global user.email "webiny-bot@webiny.com" - name: Set git username run: git config --global user.name "webiny-bot" - name: Create a Verdaccio user and write its token into .npmrc working-directory: v6 run: >- for i in $(seq 1 30); do curl -sf http://localhost:4873/-/ping > /dev/null && break sleep 1 done RESPONSE=$(curl -sf -X PUT -H "Content-Type: application/json" \ -d '{"name":"webiny-bot","password":"webiny-bot"}' \ http://localhost:4873/-/user/org.couchdb.user:webiny-bot) TOKEN=$(printf '%s' "$RESPONSE" | node -e 'let d="";process.stdin.on("data",c=>d+=c).on("end",()=>{try{process.stdout.write(JSON.parse(d).token||"")}catch{}})') if [ -z "$TOKEN" ]; then echo "::error::Could not create the Verdaccio user (is Verdaccio running, or was a user already registered?)." exit 1 fi echo "::add-mask::$TOKEN" echo "//localhost:4873/:_authToken=\"$TOKEN\"" > .npmrc - name: Version and publish to Verdaccio run: yarn release --type=verdaccio working-directory: v6 - name: Disable Webiny telemetry run: > mkdir ~/.webiny && echo '{ "id": "ci", "telemetry": false }' > ~/.webiny/config - name: Create a new Webiny project run: > npx create-webiny-project@local-npm new-webiny-project --tag local-npm --no-interactive --assign-to-yarnrc '{"npmRegistryServer":"http://localhost:4873","unsafeHttpWhitelist":["localhost"]}' --template-options '{"region":"eu-central-1","storageOps":"ddb"}' - name: Configure the bug reporter in webiny.config.tsx working-directory: v6 run: >- node .github/workflows/wac/utils/runNodeScripts/configureBugReporter.js '${{ github.workspace }}/new-webiny-project' - name: Add the E2E API route to webiny.config.tsx working-directory: v6 run: >- node .github/workflows/wac/utils/runNodeScripts/configureApiRoute.js '${{ github.workspace }}/new-webiny-project' - name: Print CLI version working-directory: new-webiny-project run: yarn webiny --version - name: Create project-files artifact uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f with: name: project-files-ddb retention-days: 1 include-hidden-files: true path: |- new-webiny-project/ !new-webiny-project/node_modules/**/* !new-webiny-project/**/node_modules/**/* !new-webiny-project/.yarn/cache/**/* - name: Enable extension whitelabeling working-directory: new-webiny-project run: yarn webiny extension whitelabeling - name: Enable extension bug-report-ai working-directory: new-webiny-project run: yarn webiny extension bug-report-ai - name: API bundle size limit run: >- echo "API bundle size limit: ${WEBINY_INFRA_API_MAX_BUNDLE_SIZE:-6291456} bytes" - name: Deploy Core working-directory: new-webiny-project run: yarn webiny deploy core --env dev - name: Deploy API working-directory: new-webiny-project run: yarn webiny deploy api --env dev - name: Deploy Admin Area working-directory: new-webiny-project run: yarn webiny deploy admin --env dev - name: Extract admin app URL id: admin-url working-directory: new-webiny-project run: >- echo "admin-url=$(yarn webiny output admin --env dev --json 2>/dev/null | jq -r '.appUrl // empty')" >> $GITHUB_OUTPUT - name: Extract API URL id: api-url working-directory: new-webiny-project run: >- echo "api-url=$(yarn webiny output api --env dev --json 2>/dev/null | jq -r '.apiUrl // empty')" >> $GITHUB_OUTPUT - name: Resolve Playwright version id: playwright-version working-directory: v6 run: >- echo "version=$(yarn workspace e2e-tests playwright --version | cut -d' ' -f2)" >> $GITHUB_OUTPUT - name: Cache Playwright browsers uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: ~/.cache/ms-playwright key: >- playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }} - name: Install Playwright browser working-directory: v6/e2e run: >- yarn playwright install chromium if yarn node --input-type=module -e "import { chromium } from 'playwright'; const browser = await chromium.launch(); await browser.close();"; then echo "Chromium starts without installing system packages." else echo "::warning::Chromium did not start. Installing its system packages." yarn playwright install-deps chromium fi - name: E2E - run installation wizard test id: e2e-installation working-directory: v6 env: E2E_ADMIN_URL: ${{ steps.admin-url.outputs.admin-url }} E2E_INSTALLATION: '1' E2E_TELEMETRY_DISABLED: '1' run: |- rm -f e2e/.e2e/summary.md yarn e2e --tag installation --reporter list,junit,markdown - name: E2E - installation - write job summary if: always() && steps.e2e-installation.outcome != 'skipped' working-directory: v6 run: |- if [ -f e2e/.e2e/summary.md ]; then echo "## E2E - installation" >> "$GITHUB_STEP_SUMMARY" cat e2e/.e2e/summary.md >> "$GITHUB_STEP_SUMMARY" fi - name: E2E - upload installation test results if: failure() uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f with: name: e2e-results-ddb retention-days: 7 if-no-files-found: ignore include-hidden-files: true path: v6/e2e/.e2e - name: E2E - run tests id: e2e-tests working-directory: v6 env: E2E_ADMIN_URL: ${{ steps.admin-url.outputs.admin-url }} E2E_API_URL: ${{ steps.api-url.outputs.api-url }} E2E_TELEMETRY_DISABLED: '1' run: >- rm -f e2e/.e2e/summary.md yarn e2e --exclude-tag wcp,ai,installation --pass-with-no-tests --reporter list,junit,markdown - name: E2E - tests - write job summary if: always() && steps.e2e-tests.outcome != 'skipped' working-directory: v6 run: |- if [ -f e2e/.e2e/summary.md ]; then echo "## E2E - tests" >> "$GITHUB_STEP_SUMMARY" cat e2e/.e2e/summary.md >> "$GITHUB_STEP_SUMMARY" fi - name: E2E - upload test results if: failure() uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f with: name: e2e-test-results-ddb retention-days: 7 if-no-files-found: ignore include-hidden-files: true path: v6/e2e/.e2e permissions: contents: read actions: write id-token: write e2eTests-ddb-os-setup: needs: - constants - build runs-on: ubuntu-latest name: E2E (DDB+OS) - Project setup environment: next env: NODE_OPTIONS: '--max_old_space_size=4096' YARN_ENABLE_IMMUTABLE_INSTALLS: 'false' PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }} PULUMI_SECRETS_PROVIDER: ${{ secrets.PULUMI_SECRETS_PROVIDER }} WEBINY_INFRA_API_MAX_BUNDLE_SIZE: ${{ vars.WEBINY_INFRA_API_MAX_BUNDLE_SIZE }} BUG_REPORT_GITHUB_TOKEN: ${{ secrets.BUG_REPORT_GITHUB_TOKEN }} BUG_REPORT_REPOSITORY: ${{ vars.BUG_REPORT_REPOSITORY }} AWS_OPENSEARCH_DOMAIN_NAME: ${{ secrets.OPENSEARCH_DOMAIN_NAME }} OPENSEARCH_ENDPOINT: ${{ secrets.OPENSEARCH_ENDPOINT }} OPENSEARCH_USERNAME: ${{ secrets.OPENSEARCH_USERNAME }} OPENSEARCH_PASSWORD: ${{ secrets.OPENSEARCH_PASSWORD }} OPENSEARCH_INDEX_PREFIX: ${{ github.run_id }}_ steps: - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 with: node-version: 24 - name: Configure AWS Credentials uses: >- aws-actions/configure-aws-credentials@8df5847569e6427dd6c4fb1cf565c83acfa8afa7 with: role-to-assume: arn:aws:iam::726952677045:role/GitHubActionsWebinyJs aws-region: eu-central-1 - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 with: fetch-depth: 0 path: v6 - name: Resolve Yarn cache folder id: yarn-cache-folder working-directory: v6 run: echo "path=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: ${{ steps.yarn-cache-folder.outputs.path }} key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} restore-keys: yarn-${{ runner.os }}- - uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: v6/.webiny/cached-packages key: ${{ needs.constants.outputs.run-cache-key }} - name: Install dependencies run: yarn --immutable working-directory: v6 - name: Build packages run: yarn build working-directory: v6 - name: Start Verdaccio local server working-directory: v6 run: yarn add pm2 && npx pm2 start verdaccio -- -c .verdaccio.yaml - name: Configure NPM to use local registry run: npm config set registry http://localhost:4873 - name: Set git email run: git config --global user.email "webiny-bot@webiny.com" - name: Set git username run: git config --global user.name "webiny-bot" - name: Create a Verdaccio user and write its token into .npmrc working-directory: v6 run: >- for i in $(seq 1 30); do curl -sf http://localhost:4873/-/ping > /dev/null && break sleep 1 done RESPONSE=$(curl -sf -X PUT -H "Content-Type: application/json" \ -d '{"name":"webiny-bot","password":"webiny-bot"}' \ http://localhost:4873/-/user/org.couchdb.user:webiny-bot) TOKEN=$(printf '%s' "$RESPONSE" | node -e 'let d="";process.stdin.on("data",c=>d+=c).on("end",()=>{try{process.stdout.write(JSON.parse(d).token||"")}catch{}})') if [ -z "$TOKEN" ]; then echo "::error::Could not create the Verdaccio user (is Verdaccio running, or was a user already registered?)." exit 1 fi echo "::add-mask::$TOKEN" echo "//localhost:4873/:_authToken=\"$TOKEN\"" > .npmrc - name: Version and publish to Verdaccio run: yarn release --type=verdaccio working-directory: v6 - name: Disable Webiny telemetry run: > mkdir ~/.webiny && echo '{ "id": "ci", "telemetry": false }' > ~/.webiny/config - name: Create a new Webiny project run: > npx create-webiny-project@local-npm new-webiny-project --tag local-npm --no-interactive --assign-to-yarnrc '{"npmRegistryServer":"http://localhost:4873","unsafeHttpWhitelist":["localhost"]}' --template-options '{"region":"eu-central-1","storageOps":"ddb-os"}' - name: Configure OpenSearch domain name and index prefix in webiny.config.tsx working-directory: new-webiny-project run: >- sed -i 's|||g' webiny.config.tsx - name: Configure the bug reporter in webiny.config.tsx working-directory: v6 run: >- node .github/workflows/wac/utils/runNodeScripts/configureBugReporter.js '${{ github.workspace }}/new-webiny-project' - name: Add the E2E API route to webiny.config.tsx working-directory: v6 run: >- node .github/workflows/wac/utils/runNodeScripts/configureApiRoute.js '${{ github.workspace }}/new-webiny-project' - name: Print CLI version working-directory: new-webiny-project run: yarn webiny --version - name: Create project-files artifact uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f with: name: project-files-ddb-os retention-days: 1 include-hidden-files: true path: |- new-webiny-project/ !new-webiny-project/node_modules/**/* !new-webiny-project/**/node_modules/**/* !new-webiny-project/.yarn/cache/**/* - name: Enable extension whitelabeling working-directory: new-webiny-project run: yarn webiny extension whitelabeling - name: Enable extension bug-report-ai working-directory: new-webiny-project run: yarn webiny extension bug-report-ai - name: API bundle size limit run: >- echo "API bundle size limit: ${WEBINY_INFRA_API_MAX_BUNDLE_SIZE:-6291456} bytes" - name: Deploy Core working-directory: new-webiny-project run: yarn webiny deploy core --env dev - name: Deploy API working-directory: new-webiny-project run: yarn webiny deploy api --env dev - name: Deploy Admin Area working-directory: new-webiny-project run: yarn webiny deploy admin --env dev - name: Verify DDB+OS deployment working-directory: new-webiny-project run: >- OUTPUT=$(yarn webiny output core --env dev --json) && echo "$OUTPUT" && echo "$OUTPUT" | jq -e '.databaseSetup == "ddb+os"' || (echo "ERROR: Expected databaseSetup to be 'ddb+os' but got a different value" && exit 1) - name: Extract admin app URL id: admin-url working-directory: new-webiny-project run: >- echo "admin-url=$(yarn webiny output admin --env dev --json 2>/dev/null | jq -r '.appUrl // empty')" >> $GITHUB_OUTPUT - name: Extract API URL id: api-url working-directory: new-webiny-project run: >- echo "api-url=$(yarn webiny output api --env dev --json 2>/dev/null | jq -r '.apiUrl // empty')" >> $GITHUB_OUTPUT - name: Resolve Playwright version id: playwright-version working-directory: v6 run: >- echo "version=$(yarn workspace e2e-tests playwright --version | cut -d' ' -f2)" >> $GITHUB_OUTPUT - name: Cache Playwright browsers uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: ~/.cache/ms-playwright key: >- playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }} - name: Install Playwright browser working-directory: v6/e2e run: >- yarn playwright install chromium if yarn node --input-type=module -e "import { chromium } from 'playwright'; const browser = await chromium.launch(); await browser.close();"; then echo "Chromium starts without installing system packages." else echo "::warning::Chromium did not start. Installing its system packages." yarn playwright install-deps chromium fi - name: E2E - run installation wizard test id: e2e-installation working-directory: v6 env: E2E_ADMIN_URL: ${{ steps.admin-url.outputs.admin-url }} E2E_INSTALLATION: '1' E2E_TELEMETRY_DISABLED: '1' run: |- rm -f e2e/.e2e/summary.md yarn e2e --tag installation --reporter list,junit,markdown - name: E2E - installation - write job summary if: always() && steps.e2e-installation.outcome != 'skipped' working-directory: v6 run: |- if [ -f e2e/.e2e/summary.md ]; then echo "## E2E - installation" >> "$GITHUB_STEP_SUMMARY" cat e2e/.e2e/summary.md >> "$GITHUB_STEP_SUMMARY" fi - name: E2E - upload installation test results if: failure() uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f with: name: e2e-results-ddb-os retention-days: 7 if-no-files-found: ignore include-hidden-files: true path: v6/e2e/.e2e - name: E2E - run tests id: e2e-tests working-directory: v6 env: E2E_ADMIN_URL: ${{ steps.admin-url.outputs.admin-url }} E2E_API_URL: ${{ steps.api-url.outputs.api-url }} E2E_TELEMETRY_DISABLED: '1' run: >- rm -f e2e/.e2e/summary.md yarn e2e --exclude-tag wcp,ai,installation --pass-with-no-tests --reporter list,junit,markdown - name: E2E - tests - write job summary if: always() && steps.e2e-tests.outcome != 'skipped' working-directory: v6 run: |- if [ -f e2e/.e2e/summary.md ]; then echo "## E2E - tests" >> "$GITHUB_STEP_SUMMARY" cat e2e/.e2e/summary.md >> "$GITHUB_STEP_SUMMARY" fi - name: E2E - upload test results if: failure() uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f with: name: e2e-test-results-ddb-os retention-days: 7 if-no-files-found: ignore include-hidden-files: true path: v6/e2e/.e2e permissions: contents: read actions: write id-token: write e2eTests-standalone-publish: needs: - constants - build name: E2E (Standalone) - Publish to Verdaccio steps: - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 with: node-version: 24 - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 with: path: v6 - name: Resolve Yarn cache folder id: yarn-cache-folder working-directory: v6 run: echo "path=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: ${{ steps.yarn-cache-folder.outputs.path }} key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} restore-keys: yarn-${{ runner.os }}- - uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: v6/.webiny/cached-packages key: ${{ needs.constants.outputs.run-cache-key }} - name: Install dependencies run: yarn --immutable working-directory: v6 - name: Build packages run: yarn build working-directory: v6 - name: Start Verdaccio local server working-directory: v6 run: yarn add pm2 && npx pm2 start verdaccio -- -c .verdaccio.yaml - name: Configure NPM to use local registry run: npm config set registry http://localhost:4873 - name: Set git email run: git config --global user.email "webiny-bot@webiny.com" - name: Set git username run: git config --global user.name "webiny-bot" - name: Create a Verdaccio user and write its token into .npmrc working-directory: v6 run: >- for i in $(seq 1 30); do curl -sf http://localhost:4873/-/ping > /dev/null && break sleep 1 done RESPONSE=$(curl -sf -X PUT -H "Content-Type: application/json" \ -d '{"name":"webiny-bot","password":"webiny-bot"}' \ http://localhost:4873/-/user/org.couchdb.user:webiny-bot) TOKEN=$(printf '%s' "$RESPONSE" | node -e 'let d="";process.stdin.on("data",c=>d+=c).on("end",()=>{try{process.stdout.write(JSON.parse(d).token||"")}catch{}})') if [ -z "$TOKEN" ]; then echo "::error::Could not create the Verdaccio user (is Verdaccio running, or was a user already registered?)." exit 1 fi echo "::add-mask::$TOKEN" echo "//localhost:4873/:_authToken=\"$TOKEN\"" > .npmrc - name: Version and publish to Verdaccio working-directory: v6 run: yarn release --type=verdaccio - name: Compress Verdaccio storage run: >- tar -cf verdaccio-storage.tzst --use-compress-program=zstdmt -C "v6" .verdaccio - name: Upload Verdaccio storage uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a with: name: verdaccio-storage path: verdaccio-storage.tzst retention-days: 1 compression-level: 0 if-no-files-found: error overwrite: true runs-on: ubuntu-latest env: NODE_OPTIONS: '--max_old_space_size=4096' YARN_ENABLE_IMMUTABLE_INSTALLS: false permissions: contents: read actions: write e2eTests-standalone-sqlite-build: needs: - e2eTests-standalone-publish name: E2E - Standalone (SQLite) - Build steps: - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 with: node-version: 24 - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 with: path: v6 - name: Resolve Yarn cache folder id: yarn-cache-folder working-directory: v6 run: echo "path=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: ${{ steps.yarn-cache-folder.outputs.path }} key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} restore-keys: yarn-${{ runner.os }}- - name: Install dependencies working-directory: v6 run: yarn --immutable - name: Download Verdaccio storage uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c with: name: verdaccio-storage - name: Extract Verdaccio storage run: tar -xf verdaccio-storage.tzst --use-compress-program=zstdmt -C "v6" - name: Start Verdaccio local server working-directory: v6 run: yarn add pm2 && npx pm2 start verdaccio -- -c .verdaccio.yaml - name: Configure NPM to use local registry run: npm config set registry http://localhost:4873 - name: Set git email run: git config --global user.email "webiny-bot@webiny.com" - name: Set git username run: git config --global user.name "webiny-bot" - name: Disable Webiny telemetry run: > mkdir ~/.webiny && echo '{ "id": "ci", "telemetry": false }' > ~/.webiny/config - name: Create a new standalone Webiny project run: >- npx create-webiny-project@local-npm new-webiny-project-standalone --tag local-npm --no-interactive --hosting-type standalone --assign-to-yarnrc '{"npmRegistryServer":"http://localhost:4873","unsafeHttpWhitelist":["localhost"]}' --template-options '{"storageOps":"sqlite"}' - name: Configure the bug reporter in webiny.config.tsx working-directory: v6 run: >- node .github/workflows/wac/utils/runNodeScripts/configureBugReporter.js '${{ github.workspace }}/new-webiny-project-standalone' - name: Add the E2E API route to webiny.config.tsx working-directory: v6 run: >- node .github/workflows/wac/utils/runNodeScripts/configureApiRoute.js '${{ github.workspace }}/new-webiny-project-standalone' - name: Print CLI version working-directory: new-webiny-project-standalone run: yarn webiny --version - name: Build API and Admin working-directory: new-webiny-project-standalone env: WEBINY_HOSTING_TYPE: standalone WEBINY_API_URL: http://localhost:3002 BUG_REPORT_GITHUB_TOKEN: ${{ secrets.BUG_REPORT_GITHUB_TOKEN }} BUG_REPORT_REPOSITORY: ${{ vars.BUG_REPORT_REPOSITORY }} run: yarn webiny build api && yarn webiny build admin - name: Compress API and Admin builds run: >- tar -cf standalone-build-sqlite.tzst --use-compress-program=zstdmt new-webiny-project-standalone/.webiny/workspace/apps/api/graphql/build new-webiny-project-standalone/.webiny/workspace/apps/admin/build - name: Upload API and Admin builds uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a with: name: standalone-build-sqlite path: standalone-build-sqlite.tzst retention-days: 1 compression-level: 0 if-no-files-found: error overwrite: true runs-on: ubuntu-latest env: NODE_OPTIONS: '--max_old_space_size=4096' YARN_ENABLE_IMMUTABLE_INSTALLS: false permissions: contents: read actions: write e2eTests-standalone-sqlite: needs: - e2eTests-standalone-sqlite-build name: E2E - Standalone (SQLite) / shard ${{ matrix.shard }} strategy: fail-fast: false matrix: shard: - 1 steps: - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 with: node-version: 24 - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 with: path: v6 - name: Resolve Yarn cache folder id: yarn-cache-folder working-directory: v6 run: echo "path=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: ${{ steps.yarn-cache-folder.outputs.path }} key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} restore-keys: yarn-${{ runner.os }}- - name: Install dependencies working-directory: v6 run: yarn --immutable - name: Download API and Admin builds uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c with: name: standalone-build-sqlite - name: Extract API and Admin builds run: tar -xf standalone-build-sqlite.tzst --use-compress-program=zstdmt - name: Start API env: PORT: '3002' WEBINY_SQL_FILENAME: >- ${{ github.workspace }}/new-webiny-project-standalone/.webiny/server.sqlite WEBINY_API_URL: http://localhost:3002 WEBINY_ADMIN_URL: http://localhost:3001 WEBINY_LOCAL_STORAGE_PATH: >- ${{ github.workspace }}/new-webiny-project-standalone/.webiny/storage WEBINY_UPLOAD_SECRET: e2e-upload-secret WEBINY_SELF_HOSTED_AUTH_SECRET: e2e-signing-secret WEBINY_ENCRYPTION_PASSPHRASE: e2e-encryption-passphrase WEBINY_HASHING_PEPPER: e2e-hashing-pepper run: >- mkdir -p "$(dirname "${WEBINY_SQL_FILENAME:-/tmp/unused}")" mkdir -p "${WEBINY_LOCAL_STORAGE_PATH:-/tmp/unused}" cd new-webiny-project-standalone/.webiny/workspace/apps/api/graphql/build nohup node start.mjs > /tmp/webiny-api.log 2>&1 & echo "API starting on port 3002" - name: Serve Admin run: >- nohup npx --yes serve -s new-webiny-project-standalone/.webiny/workspace/apps/admin/build -l 3001 > /tmp/webiny-admin.log 2>&1 & echo "Admin starting on port 3001" - name: Wait for API and Admin run: >- set -euo pipefail wait_for_port() { for _ in $(seq 1 90); do if (echo > /dev/tcp/127.0.0.1/"$1") >/dev/null 2>&1; then echo "port $1 is accepting connections" return 0 fi sleep 2 done echo "::error::Timed out waiting for port $1." return 1 } wait_for_port 3002 wait_for_port 3001 # A listening socket is not the same as a working GraphQL endpoint. curl -fsS -X POST http://localhost:3002/graphql -H 'content-type: application/json' \ -d '{"query":"{__typename}"}' > /dev/null echo "GraphQL API responded." - name: Resolve Playwright version id: playwright-version working-directory: v6 run: >- echo "version=$(yarn workspace e2e-tests playwright --version | cut -d' ' -f2)" >> $GITHUB_OUTPUT - name: Cache Playwright browsers uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: ~/.cache/ms-playwright key: >- playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }} - name: Install Playwright browser working-directory: v6/e2e run: >- yarn playwright install chromium if yarn node --input-type=module -e "import { chromium } from 'playwright'; const browser = await chromium.launch(); await browser.close();"; then echo "Chromium starts without installing system packages." else echo "::warning::Chromium did not start. Installing its system packages." yarn playwright install-deps chromium fi - name: E2E - run installation wizard test id: e2e-installation working-directory: v6 env: E2E_ADMIN_URL: http://localhost:3001 E2E_INSTALLATION: '1' E2E_TELEMETRY_DISABLED: '1' run: |- rm -f e2e/.e2e/summary.md yarn e2e --tag installation --reporter list,junit,markdown - name: E2E - installation - write job summary if: always() && steps.e2e-installation.outcome != 'skipped' working-directory: v6 run: |- if [ -f e2e/.e2e/summary.md ]; then echo "## E2E - installation" >> "$GITHUB_STEP_SUMMARY" cat e2e/.e2e/summary.md >> "$GITHUB_STEP_SUMMARY" fi - name: E2E - upload installation test results if: failure() uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f with: name: e2e-results-standalone-sqlite-shard-${{ matrix.shard }} retention-days: 7 if-no-files-found: ignore include-hidden-files: true path: v6/e2e/.e2e - name: E2E - run tests id: e2e-tests working-directory: v6 env: E2E_ADMIN_URL: http://localhost:3001 E2E_API_URL: http://localhost:3002 E2E_TELEMETRY_DISABLED: '1' run: >- rm -f e2e/.e2e/summary.md yarn e2e --exclude-tag wcp,ai,installation --shard ${{ matrix.shard }}/1 --pass-with-no-tests --reporter list,junit,markdown - name: E2E - tests - write job summary if: always() && steps.e2e-tests.outcome != 'skipped' working-directory: v6 run: |- if [ -f e2e/.e2e/summary.md ]; then echo "## E2E - tests" >> "$GITHUB_STEP_SUMMARY" cat e2e/.e2e/summary.md >> "$GITHUB_STEP_SUMMARY" fi - name: E2E - upload test results if: failure() uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f with: name: e2e-test-results-standalone-sqlite-shard-${{ matrix.shard }} retention-days: 7 if-no-files-found: ignore include-hidden-files: true path: v6/e2e/.e2e - name: Print server logs if: failure() run: >- for log in /tmp/webiny-api*.log /tmp/webiny-nginx-error.log; do [ -f "$log" ] || continue echo "::group::$log"; cat "$log"; echo "::endgroup::" done echo "::group::Admin log"; cat /tmp/webiny-admin.log || true; echo "::endgroup::" runs-on: ubuntu-latest env: NODE_OPTIONS: '--max_old_space_size=4096' YARN_ENABLE_IMMUTABLE_INSTALLS: false permissions: contents: read actions: write e2eTests-standalone-postgres-build: needs: - e2eTests-standalone-publish name: E2E - Standalone (Postgres) - Build services: postgres: image: postgres:17 env: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: webiny ports: - '5432:5432' options: >- --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 steps: - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 with: node-version: 24 - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 with: path: v6 - name: Resolve Yarn cache folder id: yarn-cache-folder working-directory: v6 run: echo "path=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: ${{ steps.yarn-cache-folder.outputs.path }} key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} restore-keys: yarn-${{ runner.os }}- - name: Install dependencies working-directory: v6 run: yarn --immutable - name: Download Verdaccio storage uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c with: name: verdaccio-storage - name: Extract Verdaccio storage run: tar -xf verdaccio-storage.tzst --use-compress-program=zstdmt -C "v6" - name: Start Verdaccio local server working-directory: v6 run: yarn add pm2 && npx pm2 start verdaccio -- -c .verdaccio.yaml - name: Configure NPM to use local registry run: npm config set registry http://localhost:4873 - name: Set git email run: git config --global user.email "webiny-bot@webiny.com" - name: Set git username run: git config --global user.name "webiny-bot" - name: Disable Webiny telemetry run: > mkdir ~/.webiny && echo '{ "id": "ci", "telemetry": false }' > ~/.webiny/config - name: Create a new standalone Webiny project run: >- npx create-webiny-project@local-npm new-webiny-project-standalone --tag local-npm --no-interactive --hosting-type standalone --assign-to-yarnrc '{"npmRegistryServer":"http://localhost:4873","unsafeHttpWhitelist":["localhost"]}' --template-options '{"storageOps":"postgres"}' - name: Configure the bug reporter in webiny.config.tsx working-directory: v6 run: >- node .github/workflows/wac/utils/runNodeScripts/configureBugReporter.js '${{ github.workspace }}/new-webiny-project-standalone' - name: Add the E2E API route to webiny.config.tsx working-directory: v6 run: >- node .github/workflows/wac/utils/runNodeScripts/configureApiRoute.js '${{ github.workspace }}/new-webiny-project-standalone' - name: Print CLI version working-directory: new-webiny-project-standalone run: yarn webiny --version - name: Build API and Admin working-directory: new-webiny-project-standalone env: WEBINY_HOSTING_TYPE: standalone WEBINY_API_URL: http://localhost:3002 BUG_REPORT_GITHUB_TOKEN: ${{ secrets.BUG_REPORT_GITHUB_TOKEN }} BUG_REPORT_REPOSITORY: ${{ vars.BUG_REPORT_REPOSITORY }} run: yarn webiny build api && yarn webiny build admin - name: Compress API and Admin builds run: >- tar -cf standalone-build-postgres.tzst --use-compress-program=zstdmt new-webiny-project-standalone/.webiny/workspace/apps/api/graphql/build new-webiny-project-standalone/.webiny/workspace/apps/admin/build - name: Upload API and Admin builds uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a with: name: standalone-build-postgres path: standalone-build-postgres.tzst retention-days: 1 compression-level: 0 if-no-files-found: error overwrite: true runs-on: ubuntu-latest env: NODE_OPTIONS: '--max_old_space_size=4096' YARN_ENABLE_IMMUTABLE_INSTALLS: false permissions: contents: read actions: write e2eTests-standalone-postgres: needs: - e2eTests-standalone-postgres-build name: E2E - Standalone (Postgres) / shard ${{ matrix.shard }} strategy: fail-fast: false matrix: shard: - 1 services: postgres: image: postgres:17 env: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: webiny ports: - '5432:5432' options: >- --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 steps: - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 with: node-version: 24 - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 with: path: v6 - name: Resolve Yarn cache folder id: yarn-cache-folder working-directory: v6 run: echo "path=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: ${{ steps.yarn-cache-folder.outputs.path }} key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} restore-keys: yarn-${{ runner.os }}- - name: Install dependencies working-directory: v6 run: yarn --immutable - name: Download API and Admin builds uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c with: name: standalone-build-postgres - name: Extract API and Admin builds run: tar -xf standalone-build-postgres.tzst --use-compress-program=zstdmt - name: Start API env: PORT: '3002' WEBINY_PG_HOST: localhost WEBINY_PG_PORT: '5432' WEBINY_PG_USER: postgres WEBINY_PG_PASSWORD: postgres WEBINY_PG_DATABASE: webiny WEBINY_API_URL: http://localhost:3002 WEBINY_ADMIN_URL: http://localhost:3001 WEBINY_LOCAL_STORAGE_PATH: >- ${{ github.workspace }}/new-webiny-project-standalone/.webiny/storage WEBINY_UPLOAD_SECRET: e2e-upload-secret WEBINY_SELF_HOSTED_AUTH_SECRET: e2e-signing-secret WEBINY_ENCRYPTION_PASSPHRASE: e2e-encryption-passphrase WEBINY_HASHING_PEPPER: e2e-hashing-pepper run: >- mkdir -p "$(dirname "${WEBINY_SQL_FILENAME:-/tmp/unused}")" mkdir -p "${WEBINY_LOCAL_STORAGE_PATH:-/tmp/unused}" cd new-webiny-project-standalone/.webiny/workspace/apps/api/graphql/build nohup node start.mjs > /tmp/webiny-api.log 2>&1 & echo "API starting on port 3002" - name: Serve Admin run: >- nohup npx --yes serve -s new-webiny-project-standalone/.webiny/workspace/apps/admin/build -l 3001 > /tmp/webiny-admin.log 2>&1 & echo "Admin starting on port 3001" - name: Wait for API and Admin run: >- set -euo pipefail wait_for_port() { for _ in $(seq 1 90); do if (echo > /dev/tcp/127.0.0.1/"$1") >/dev/null 2>&1; then echo "port $1 is accepting connections" return 0 fi sleep 2 done echo "::error::Timed out waiting for port $1." return 1 } wait_for_port 3002 wait_for_port 3001 # A listening socket is not the same as a working GraphQL endpoint. curl -fsS -X POST http://localhost:3002/graphql -H 'content-type: application/json' \ -d '{"query":"{__typename}"}' > /dev/null echo "GraphQL API responded." - name: Resolve Playwright version id: playwright-version working-directory: v6 run: >- echo "version=$(yarn workspace e2e-tests playwright --version | cut -d' ' -f2)" >> $GITHUB_OUTPUT - name: Cache Playwright browsers uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: ~/.cache/ms-playwright key: >- playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }} - name: Install Playwright browser working-directory: v6/e2e run: >- yarn playwright install chromium if yarn node --input-type=module -e "import { chromium } from 'playwright'; const browser = await chromium.launch(); await browser.close();"; then echo "Chromium starts without installing system packages." else echo "::warning::Chromium did not start. Installing its system packages." yarn playwright install-deps chromium fi - name: E2E - run installation wizard test id: e2e-installation working-directory: v6 env: E2E_ADMIN_URL: http://localhost:3001 E2E_INSTALLATION: '1' E2E_TELEMETRY_DISABLED: '1' run: |- rm -f e2e/.e2e/summary.md yarn e2e --tag installation --reporter list,junit,markdown - name: E2E - installation - write job summary if: always() && steps.e2e-installation.outcome != 'skipped' working-directory: v6 run: |- if [ -f e2e/.e2e/summary.md ]; then echo "## E2E - installation" >> "$GITHUB_STEP_SUMMARY" cat e2e/.e2e/summary.md >> "$GITHUB_STEP_SUMMARY" fi - name: E2E - upload installation test results if: failure() uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f with: name: e2e-results-standalone-postgres-shard-${{ matrix.shard }} retention-days: 7 if-no-files-found: ignore include-hidden-files: true path: v6/e2e/.e2e - name: E2E - run tests id: e2e-tests working-directory: v6 env: E2E_ADMIN_URL: http://localhost:3001 E2E_API_URL: http://localhost:3002 E2E_TELEMETRY_DISABLED: '1' run: >- rm -f e2e/.e2e/summary.md yarn e2e --exclude-tag wcp,ai,installation --shard ${{ matrix.shard }}/1 --pass-with-no-tests --reporter list,junit,markdown - name: E2E - tests - write job summary if: always() && steps.e2e-tests.outcome != 'skipped' working-directory: v6 run: |- if [ -f e2e/.e2e/summary.md ]; then echo "## E2E - tests" >> "$GITHUB_STEP_SUMMARY" cat e2e/.e2e/summary.md >> "$GITHUB_STEP_SUMMARY" fi - name: E2E - upload test results if: failure() uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f with: name: e2e-test-results-standalone-postgres-shard-${{ matrix.shard }} retention-days: 7 if-no-files-found: ignore include-hidden-files: true path: v6/e2e/.e2e - name: Print server logs if: failure() run: >- for log in /tmp/webiny-api*.log /tmp/webiny-nginx-error.log; do [ -f "$log" ] || continue echo "::group::$log"; cat "$log"; echo "::endgroup::" done echo "::group::Admin log"; cat /tmp/webiny-admin.log || true; echo "::endgroup::" runs-on: ubuntu-latest env: NODE_OPTIONS: '--max_old_space_size=4096' YARN_ENABLE_IMMUTABLE_INSTALLS: false permissions: contents: read actions: write e2eTests-standalone-postgres-2-processes-build: needs: - e2eTests-standalone-publish name: E2E - Standalone (Postgres, 2 API processes) - Build services: postgres: image: postgres:17 env: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: webiny ports: - '5432:5432' options: >- --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 steps: - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 with: node-version: 24 - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 with: path: v6 - name: Resolve Yarn cache folder id: yarn-cache-folder working-directory: v6 run: echo "path=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: ${{ steps.yarn-cache-folder.outputs.path }} key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} restore-keys: yarn-${{ runner.os }}- - name: Install dependencies working-directory: v6 run: yarn --immutable - name: Download Verdaccio storage uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c with: name: verdaccio-storage - name: Extract Verdaccio storage run: tar -xf verdaccio-storage.tzst --use-compress-program=zstdmt -C "v6" - name: Start Verdaccio local server working-directory: v6 run: yarn add pm2 && npx pm2 start verdaccio -- -c .verdaccio.yaml - name: Configure NPM to use local registry run: npm config set registry http://localhost:4873 - name: Set git email run: git config --global user.email "webiny-bot@webiny.com" - name: Set git username run: git config --global user.name "webiny-bot" - name: Disable Webiny telemetry run: > mkdir ~/.webiny && echo '{ "id": "ci", "telemetry": false }' > ~/.webiny/config - name: Create a new standalone Webiny project run: >- npx create-webiny-project@local-npm new-webiny-project-standalone --tag local-npm --no-interactive --hosting-type standalone --assign-to-yarnrc '{"npmRegistryServer":"http://localhost:4873","unsafeHttpWhitelist":["localhost"]}' --template-options '{"storageOps":"postgres"}' - name: Configure the bug reporter in webiny.config.tsx working-directory: v6 run: >- node .github/workflows/wac/utils/runNodeScripts/configureBugReporter.js '${{ github.workspace }}/new-webiny-project-standalone' - name: Add the E2E API route to webiny.config.tsx working-directory: v6 run: >- node .github/workflows/wac/utils/runNodeScripts/configureApiRoute.js '${{ github.workspace }}/new-webiny-project-standalone' - name: Print CLI version working-directory: new-webiny-project-standalone run: yarn webiny --version - name: Build API and Admin working-directory: new-webiny-project-standalone env: WEBINY_HOSTING_TYPE: standalone WEBINY_API_URL: http://localhost:3002 BUG_REPORT_GITHUB_TOKEN: ${{ secrets.BUG_REPORT_GITHUB_TOKEN }} BUG_REPORT_REPOSITORY: ${{ vars.BUG_REPORT_REPOSITORY }} run: yarn webiny build api && yarn webiny build admin - name: Compress API and Admin builds run: >- tar -cf standalone-build-postgres-2-processes.tzst --use-compress-program=zstdmt new-webiny-project-standalone/.webiny/workspace/apps/api/graphql/build new-webiny-project-standalone/.webiny/workspace/apps/admin/build - name: Upload API and Admin builds uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a with: name: standalone-build-postgres-2-processes path: standalone-build-postgres-2-processes.tzst retention-days: 1 compression-level: 0 if-no-files-found: error overwrite: true runs-on: ubuntu-latest env: NODE_OPTIONS: '--max_old_space_size=4096' YARN_ENABLE_IMMUTABLE_INSTALLS: false permissions: contents: read actions: write e2eTests-standalone-postgres-2-processes: needs: - e2eTests-standalone-postgres-2-processes-build name: E2E - Standalone (Postgres, 2 API processes) / shard ${{ matrix.shard }} strategy: fail-fast: false matrix: shard: - 1 services: postgres: image: postgres:17 env: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: webiny ports: - '5432:5432' options: >- --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 valkey: image: valkey/valkey:8 ports: - '6379:6379' options: >- --health-cmd "valkey-cli ping" --health-interval 2s --health-timeout 2s --health-retries 15 steps: - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 with: node-version: 24 - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 with: path: v6 - name: Resolve Yarn cache folder id: yarn-cache-folder working-directory: v6 run: echo "path=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: ${{ steps.yarn-cache-folder.outputs.path }} key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} restore-keys: yarn-${{ runner.os }}- - name: Install dependencies working-directory: v6 run: yarn --immutable - name: Download API and Admin builds uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c with: name: standalone-build-postgres-2-processes - name: Extract API and Admin builds run: >- tar -xf standalone-build-postgres-2-processes.tzst --use-compress-program=zstdmt - name: Start 2 API processes env: WEBINY_PG_HOST: localhost WEBINY_PG_PORT: '5432' WEBINY_PG_USER: postgres WEBINY_PG_PASSWORD: postgres WEBINY_PG_DATABASE: webiny WEBINY_API_URL: http://localhost:3002 WEBINY_ADMIN_URL: http://localhost:3001 WEBINY_LOCAL_STORAGE_PATH: >- ${{ github.workspace }}/new-webiny-project-standalone/.webiny/storage WEBINY_UPLOAD_SECRET: e2e-upload-secret WEBINY_SELF_HOSTED_AUTH_SECRET: e2e-signing-secret WEBINY_ENCRYPTION_PASSPHRASE: e2e-encryption-passphrase WEBINY_HASHING_PEPPER: e2e-hashing-pepper WEBINY_REDIS_URL: redis://localhost:6379 run: >- mkdir -p "$(dirname "${WEBINY_SQL_FILENAME:-/tmp/unused}")" mkdir -p "${WEBINY_LOCAL_STORAGE_PATH:-/tmp/unused}" cd new-webiny-project-standalone/.webiny/workspace/apps/api/graphql/build PORT=3012 nohup node start.mjs > /tmp/webiny-api-1.log 2>&1 & PORT=3013 nohup node start.mjs > /tmp/webiny-api-2.log 2>&1 & echo "2 API processes starting" - name: Start nginx in front of the API processes run: >- set -euo pipefail command -v nginx > /dev/null || (sudo apt-get update && sudo apt-get install -y nginx) cat > /tmp/webiny-nginx.conf <<'NGINX' worker_processes 1; pid /tmp/webiny-nginx.pid; error_log /tmp/webiny-nginx-error.log; events {} http { access_log /tmp/webiny-nginx-access.log; client_max_body_size 0; map $http_upgrade $connection_upgrade { default upgrade; '' close; } upstream webiny_api { server 127.0.0.1:3012; server 127.0.0.1:3013; } server { listen 3002; location / { proxy_pass http://webiny_api; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; proxy_set_header Host $http_host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_request_buffering off; proxy_buffering off; } } } NGINX sudo nginx -t -c /tmp/webiny-nginx.conf sudo nginx -c /tmp/webiny-nginx.conf echo "nginx listening on port 3002" - name: Serve Admin run: >- nohup npx --yes serve -s new-webiny-project-standalone/.webiny/workspace/apps/admin/build -l 3001 > /tmp/webiny-admin.log 2>&1 & echo "Admin starting on port 3001" - name: Wait for API and Admin run: >- set -euo pipefail wait_for_port() { for _ in $(seq 1 90); do if (echo > /dev/tcp/127.0.0.1/"$1") >/dev/null 2>&1; then echo "port $1 is accepting connections" return 0 fi sleep 2 done echo "::error::Timed out waiting for port $1." return 1 } wait_for_port 3012 wait_for_port 3013 wait_for_port 3002 wait_for_port 3001 # A listening socket is not the same as a working GraphQL endpoint. curl -fsS -X POST http://localhost:3002/graphql -H 'content-type: application/json' \ -d '{"query":"{__typename}"}' > /dev/null echo "GraphQL API responded." - name: Resolve Playwright version id: playwright-version working-directory: v6 run: >- echo "version=$(yarn workspace e2e-tests playwright --version | cut -d' ' -f2)" >> $GITHUB_OUTPUT - name: Cache Playwright browsers uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: ~/.cache/ms-playwright key: >- playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }} - name: Install Playwright browser working-directory: v6/e2e run: >- yarn playwright install chromium if yarn node --input-type=module -e "import { chromium } from 'playwright'; const browser = await chromium.launch(); await browser.close();"; then echo "Chromium starts without installing system packages." else echo "::warning::Chromium did not start. Installing its system packages." yarn playwright install-deps chromium fi - name: E2E - run installation wizard test id: e2e-installation working-directory: v6 env: E2E_ADMIN_URL: http://localhost:3001 E2E_INSTALLATION: '1' E2E_TELEMETRY_DISABLED: '1' run: |- rm -f e2e/.e2e/summary.md yarn e2e --tag installation --reporter list,junit,markdown - name: E2E - installation - write job summary if: always() && steps.e2e-installation.outcome != 'skipped' working-directory: v6 run: |- if [ -f e2e/.e2e/summary.md ]; then echo "## E2E - installation" >> "$GITHUB_STEP_SUMMARY" cat e2e/.e2e/summary.md >> "$GITHUB_STEP_SUMMARY" fi - name: E2E - upload installation test results if: failure() uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f with: name: >- e2e-results-standalone-postgres-2-processes-shard-${{ matrix.shard }} retention-days: 7 if-no-files-found: ignore include-hidden-files: true path: v6/e2e/.e2e - name: E2E - run tests id: e2e-tests working-directory: v6 env: E2E_ADMIN_URL: http://localhost:3001 E2E_API_URL: http://localhost:3002 E2E_TELEMETRY_DISABLED: '1' run: >- rm -f e2e/.e2e/summary.md yarn e2e --exclude-tag wcp,ai,installation --shard ${{ matrix.shard }}/1 --pass-with-no-tests --reporter list,junit,markdown - name: E2E - tests - write job summary if: always() && steps.e2e-tests.outcome != 'skipped' working-directory: v6 run: |- if [ -f e2e/.e2e/summary.md ]; then echo "## E2E - tests" >> "$GITHUB_STEP_SUMMARY" cat e2e/.e2e/summary.md >> "$GITHUB_STEP_SUMMARY" fi - name: E2E - upload test results if: failure() uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f with: name: >- e2e-test-results-standalone-postgres-2-processes-shard-${{ matrix.shard }} retention-days: 7 if-no-files-found: ignore include-hidden-files: true path: v6/e2e/.e2e - name: Print server logs if: failure() run: >- for log in /tmp/webiny-api*.log /tmp/webiny-nginx-error.log; do [ -f "$log" ] || continue echo "::group::$log"; cat "$log"; echo "::endgroup::" done echo "::group::Admin log"; cat /tmp/webiny-admin.log || true; echo "::endgroup::" runs-on: ubuntu-latest env: NODE_OPTIONS: '--max_old_space_size=4096' YARN_ENABLE_IMMUTABLE_INSTALLS: false permissions: contents: read actions: write e2eTests-standalone-sqlite-wcp-build: needs: - e2eTests-standalone-publish name: E2E - Standalone (SQLite, WCP) - Build steps: - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 with: node-version: 24 - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 with: path: v6 - name: Resolve Yarn cache folder id: yarn-cache-folder working-directory: v6 run: echo "path=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: ${{ steps.yarn-cache-folder.outputs.path }} key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} restore-keys: yarn-${{ runner.os }}- - name: Install dependencies working-directory: v6 run: yarn --immutable - name: Download Verdaccio storage uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c with: name: verdaccio-storage - name: Extract Verdaccio storage run: tar -xf verdaccio-storage.tzst --use-compress-program=zstdmt -C "v6" - name: Start Verdaccio local server working-directory: v6 run: yarn add pm2 && npx pm2 start verdaccio -- -c .verdaccio.yaml - name: Configure NPM to use local registry run: npm config set registry http://localhost:4873 - name: Set git email run: git config --global user.email "webiny-bot@webiny.com" - name: Set git username run: git config --global user.name "webiny-bot" - name: Disable Webiny telemetry run: > mkdir ~/.webiny && echo '{ "id": "ci", "telemetry": false }' > ~/.webiny/config - name: Create a new standalone Webiny project run: >- npx create-webiny-project@local-npm new-webiny-project-standalone --tag local-npm --no-interactive --hosting-type standalone --assign-to-yarnrc '{"npmRegistryServer":"http://localhost:4873","unsafeHttpWhitelist":["localhost"]}' --template-options '{"storageOps":"sqlite"}' - name: Configure the bug reporter in webiny.config.tsx working-directory: v6 run: >- node .github/workflows/wac/utils/runNodeScripts/configureBugReporter.js '${{ github.workspace }}/new-webiny-project-standalone' - name: Add the E2E API route to webiny.config.tsx working-directory: v6 run: >- node .github/workflows/wac/utils/runNodeScripts/configureApiRoute.js '${{ github.workspace }}/new-webiny-project-standalone' - name: Print CLI version working-directory: new-webiny-project-standalone run: yarn webiny --version - name: Build API and Admin working-directory: new-webiny-project-standalone env: WEBINY_HOSTING_TYPE: standalone WEBINY_API_URL: http://localhost:3002 BUG_REPORT_GITHUB_TOKEN: ${{ secrets.BUG_REPORT_GITHUB_TOKEN }} BUG_REPORT_REPOSITORY: ${{ vars.BUG_REPORT_REPOSITORY }} WEBINY_PROJECT_ID: ${{ secrets.E2E_WEBINY_PROJECT_ID }} WEBINY_PROJECT_API_KEY: ${{ secrets.E2E_WEBINY_PROJECT_API_KEY }} run: yarn webiny build api && yarn webiny build admin - name: Compress API and Admin builds run: >- tar -cf standalone-build-sqlite-wcp.tzst --use-compress-program=zstdmt new-webiny-project-standalone/.webiny/workspace/apps/api/graphql/build new-webiny-project-standalone/.webiny/workspace/apps/admin/build - name: Upload API and Admin builds uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a with: name: standalone-build-sqlite-wcp path: standalone-build-sqlite-wcp.tzst retention-days: 1 compression-level: 0 if-no-files-found: error overwrite: true runs-on: ubuntu-latest env: NODE_OPTIONS: '--max_old_space_size=4096' YARN_ENABLE_IMMUTABLE_INSTALLS: false permissions: contents: read actions: write e2eTests-standalone-sqlite-wcp: needs: - e2eTests-standalone-sqlite-wcp-build name: E2E - Standalone (SQLite, WCP) / shard ${{ matrix.shard }} strategy: fail-fast: false matrix: shard: - 1 - 2 - 3 steps: - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 with: node-version: 24 - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 with: path: v6 - name: Resolve Yarn cache folder id: yarn-cache-folder working-directory: v6 run: echo "path=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: ${{ steps.yarn-cache-folder.outputs.path }} key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} restore-keys: yarn-${{ runner.os }}- - name: Install dependencies working-directory: v6 run: yarn --immutable - name: Download API and Admin builds uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c with: name: standalone-build-sqlite-wcp - name: Extract API and Admin builds run: tar -xf standalone-build-sqlite-wcp.tzst --use-compress-program=zstdmt - name: Start API env: PORT: '3002' WEBINY_SQL_FILENAME: >- ${{ github.workspace }}/new-webiny-project-standalone/.webiny/server.sqlite WEBINY_API_URL: http://localhost:3002 WEBINY_ADMIN_URL: http://localhost:3001 WEBINY_LOCAL_STORAGE_PATH: >- ${{ github.workspace }}/new-webiny-project-standalone/.webiny/storage WEBINY_UPLOAD_SECRET: e2e-upload-secret WEBINY_SELF_HOSTED_AUTH_SECRET: e2e-signing-secret WEBINY_ENCRYPTION_PASSPHRASE: e2e-encryption-passphrase WEBINY_HASHING_PEPPER: e2e-hashing-pepper WEBINY_PROJECT_ID: ${{ secrets.E2E_WEBINY_PROJECT_ID }} WEBINY_PROJECT_API_KEY: ${{ secrets.E2E_WEBINY_PROJECT_API_KEY }} run: >- mkdir -p "$(dirname "${WEBINY_SQL_FILENAME:-/tmp/unused}")" mkdir -p "${WEBINY_LOCAL_STORAGE_PATH:-/tmp/unused}" cd new-webiny-project-standalone/.webiny/workspace/apps/api/graphql/build nohup node start.mjs > /tmp/webiny-api.log 2>&1 & echo "API starting on port 3002" - name: Serve Admin run: >- nohup npx --yes serve -s new-webiny-project-standalone/.webiny/workspace/apps/admin/build -l 3001 > /tmp/webiny-admin.log 2>&1 & echo "Admin starting on port 3001" - name: Wait for API and Admin run: >- set -euo pipefail wait_for_port() { for _ in $(seq 1 90); do if (echo > /dev/tcp/127.0.0.1/"$1") >/dev/null 2>&1; then echo "port $1 is accepting connections" return 0 fi sleep 2 done echo "::error::Timed out waiting for port $1." return 1 } wait_for_port 3002 wait_for_port 3001 # A listening socket is not the same as a working GraphQL endpoint. curl -fsS -X POST http://localhost:3002/graphql -H 'content-type: application/json' \ -d '{"query":"{__typename}"}' > /dev/null echo "GraphQL API responded." - name: Resolve Playwright version id: playwright-version working-directory: v6 run: >- echo "version=$(yarn workspace e2e-tests playwright --version | cut -d' ' -f2)" >> $GITHUB_OUTPUT - name: Cache Playwright browsers uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: ~/.cache/ms-playwright key: >- playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }} - name: Install Playwright browser working-directory: v6/e2e run: >- yarn playwright install chromium if yarn node --input-type=module -e "import { chromium } from 'playwright'; const browser = await chromium.launch(); await browser.close();"; then echo "Chromium starts without installing system packages." else echo "::warning::Chromium did not start. Installing its system packages." yarn playwright install-deps chromium fi - name: E2E - run installation wizard test id: e2e-installation working-directory: v6 env: E2E_ADMIN_URL: http://localhost:3001 E2E_INSTALLATION: '1' E2E_TELEMETRY_DISABLED: '1' run: |- rm -f e2e/.e2e/summary.md yarn e2e --tag installation --reporter list,junit,markdown - name: E2E - installation - write job summary if: always() && steps.e2e-installation.outcome != 'skipped' working-directory: v6 run: |- if [ -f e2e/.e2e/summary.md ]; then echo "## E2E - installation" >> "$GITHUB_STEP_SUMMARY" cat e2e/.e2e/summary.md >> "$GITHUB_STEP_SUMMARY" fi - name: E2E - upload installation test results if: failure() uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f with: name: e2e-results-standalone-sqlite-wcp-shard-${{ matrix.shard }} retention-days: 7 if-no-files-found: ignore include-hidden-files: true path: v6/e2e/.e2e - name: AI E2E - run tests id: ai-e2e-tests working-directory: v6 env: ANTHROPIC_API_KEY: ${{ secrets.E2E_ANTHROPIC_API_KEY }} E2E_ADMIN_URL: http://localhost:3001 E2E_API_URL: http://localhost:3002 E2E_TELEMETRY_DISABLED: '1' run: >- rm -f e2e/.e2e/summary.md if [ ! -f e2e/e2e.config.ts ]; then echo "::notice::This branch has no e2e/ folder. Skipping the AI E2E tests." exit 0 fi yarn e2e --exclude-tag installation --shard ${{ matrix.shard }}/3 --pass-with-no-tests --reporter list,junit,markdown - name: AI E2E - tests - write job summary if: always() && steps.ai-e2e-tests.outcome != 'skipped' working-directory: v6 run: |- if [ -f e2e/.e2e/summary.md ]; then echo "## AI E2E - tests" >> "$GITHUB_STEP_SUMMARY" cat e2e/.e2e/summary.md >> "$GITHUB_STEP_SUMMARY" fi - name: AI E2E - upload results if: always() uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f with: name: ai-e2e-results-standalone-sqlite-wcp-shard-${{ matrix.shard }} retention-days: 7 if-no-files-found: ignore include-hidden-files: true path: v6/e2e/.e2e - name: Print server logs if: failure() run: >- for log in /tmp/webiny-api*.log /tmp/webiny-nginx-error.log; do [ -f "$log" ] || continue echo "::group::$log"; cat "$log"; echo "::endgroup::" done echo "::group::Admin log"; cat /tmp/webiny-admin.log || true; echo "::endgroup::" runs-on: ubuntu-latest env: NODE_OPTIONS: '--max_old_space_size=4096' YARN_ENABLE_IMMUTABLE_INSTALLS: false permissions: contents: read actions: write e2eTests-standalone-postgres-wcp-build: needs: - e2eTests-standalone-publish name: E2E - Standalone (Postgres, WCP) - Build services: postgres: image: postgres:17 env: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: webiny ports: - '5432:5432' options: >- --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 steps: - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 with: node-version: 24 - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 with: path: v6 - name: Resolve Yarn cache folder id: yarn-cache-folder working-directory: v6 run: echo "path=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: ${{ steps.yarn-cache-folder.outputs.path }} key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} restore-keys: yarn-${{ runner.os }}- - name: Install dependencies working-directory: v6 run: yarn --immutable - name: Download Verdaccio storage uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c with: name: verdaccio-storage - name: Extract Verdaccio storage run: tar -xf verdaccio-storage.tzst --use-compress-program=zstdmt -C "v6" - name: Start Verdaccio local server working-directory: v6 run: yarn add pm2 && npx pm2 start verdaccio -- -c .verdaccio.yaml - name: Configure NPM to use local registry run: npm config set registry http://localhost:4873 - name: Set git email run: git config --global user.email "webiny-bot@webiny.com" - name: Set git username run: git config --global user.name "webiny-bot" - name: Disable Webiny telemetry run: > mkdir ~/.webiny && echo '{ "id": "ci", "telemetry": false }' > ~/.webiny/config - name: Create a new standalone Webiny project run: >- npx create-webiny-project@local-npm new-webiny-project-standalone --tag local-npm --no-interactive --hosting-type standalone --assign-to-yarnrc '{"npmRegistryServer":"http://localhost:4873","unsafeHttpWhitelist":["localhost"]}' --template-options '{"storageOps":"postgres"}' - name: Configure the bug reporter in webiny.config.tsx working-directory: v6 run: >- node .github/workflows/wac/utils/runNodeScripts/configureBugReporter.js '${{ github.workspace }}/new-webiny-project-standalone' - name: Add the E2E API route to webiny.config.tsx working-directory: v6 run: >- node .github/workflows/wac/utils/runNodeScripts/configureApiRoute.js '${{ github.workspace }}/new-webiny-project-standalone' - name: Print CLI version working-directory: new-webiny-project-standalone run: yarn webiny --version - name: Build API and Admin working-directory: new-webiny-project-standalone env: WEBINY_HOSTING_TYPE: standalone WEBINY_API_URL: http://localhost:3002 BUG_REPORT_GITHUB_TOKEN: ${{ secrets.BUG_REPORT_GITHUB_TOKEN }} BUG_REPORT_REPOSITORY: ${{ vars.BUG_REPORT_REPOSITORY }} WEBINY_PROJECT_ID: ${{ secrets.E2E_WEBINY_PROJECT_ID }} WEBINY_PROJECT_API_KEY: ${{ secrets.E2E_WEBINY_PROJECT_API_KEY }} run: yarn webiny build api && yarn webiny build admin - name: Compress API and Admin builds run: >- tar -cf standalone-build-postgres-wcp.tzst --use-compress-program=zstdmt new-webiny-project-standalone/.webiny/workspace/apps/api/graphql/build new-webiny-project-standalone/.webiny/workspace/apps/admin/build - name: Upload API and Admin builds uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a with: name: standalone-build-postgres-wcp path: standalone-build-postgres-wcp.tzst retention-days: 1 compression-level: 0 if-no-files-found: error overwrite: true runs-on: ubuntu-latest env: NODE_OPTIONS: '--max_old_space_size=4096' YARN_ENABLE_IMMUTABLE_INSTALLS: false permissions: contents: read actions: write e2eTests-standalone-postgres-wcp: needs: - e2eTests-standalone-postgres-wcp-build name: E2E - Standalone (Postgres, WCP) / shard ${{ matrix.shard }} strategy: fail-fast: false matrix: shard: - 1 - 2 - 3 services: postgres: image: postgres:17 env: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: webiny ports: - '5432:5432' options: >- --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 steps: - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 with: node-version: 24 - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 with: path: v6 - name: Resolve Yarn cache folder id: yarn-cache-folder working-directory: v6 run: echo "path=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: ${{ steps.yarn-cache-folder.outputs.path }} key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} restore-keys: yarn-${{ runner.os }}- - name: Install dependencies working-directory: v6 run: yarn --immutable - name: Download API and Admin builds uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c with: name: standalone-build-postgres-wcp - name: Extract API and Admin builds run: >- tar -xf standalone-build-postgres-wcp.tzst --use-compress-program=zstdmt - name: Start API env: PORT: '3002' WEBINY_PG_HOST: localhost WEBINY_PG_PORT: '5432' WEBINY_PG_USER: postgres WEBINY_PG_PASSWORD: postgres WEBINY_PG_DATABASE: webiny WEBINY_API_URL: http://localhost:3002 WEBINY_ADMIN_URL: http://localhost:3001 WEBINY_LOCAL_STORAGE_PATH: >- ${{ github.workspace }}/new-webiny-project-standalone/.webiny/storage WEBINY_UPLOAD_SECRET: e2e-upload-secret WEBINY_SELF_HOSTED_AUTH_SECRET: e2e-signing-secret WEBINY_ENCRYPTION_PASSPHRASE: e2e-encryption-passphrase WEBINY_HASHING_PEPPER: e2e-hashing-pepper WEBINY_PROJECT_ID: ${{ secrets.E2E_WEBINY_PROJECT_ID }} WEBINY_PROJECT_API_KEY: ${{ secrets.E2E_WEBINY_PROJECT_API_KEY }} run: >- mkdir -p "$(dirname "${WEBINY_SQL_FILENAME:-/tmp/unused}")" mkdir -p "${WEBINY_LOCAL_STORAGE_PATH:-/tmp/unused}" cd new-webiny-project-standalone/.webiny/workspace/apps/api/graphql/build nohup node start.mjs > /tmp/webiny-api.log 2>&1 & echo "API starting on port 3002" - name: Serve Admin run: >- nohup npx --yes serve -s new-webiny-project-standalone/.webiny/workspace/apps/admin/build -l 3001 > /tmp/webiny-admin.log 2>&1 & echo "Admin starting on port 3001" - name: Wait for API and Admin run: >- set -euo pipefail wait_for_port() { for _ in $(seq 1 90); do if (echo > /dev/tcp/127.0.0.1/"$1") >/dev/null 2>&1; then echo "port $1 is accepting connections" return 0 fi sleep 2 done echo "::error::Timed out waiting for port $1." return 1 } wait_for_port 3002 wait_for_port 3001 # A listening socket is not the same as a working GraphQL endpoint. curl -fsS -X POST http://localhost:3002/graphql -H 'content-type: application/json' \ -d '{"query":"{__typename}"}' > /dev/null echo "GraphQL API responded." - name: Resolve Playwright version id: playwright-version working-directory: v6 run: >- echo "version=$(yarn workspace e2e-tests playwright --version | cut -d' ' -f2)" >> $GITHUB_OUTPUT - name: Cache Playwright browsers uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: ~/.cache/ms-playwright key: >- playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }} - name: Install Playwright browser working-directory: v6/e2e run: >- yarn playwright install chromium if yarn node --input-type=module -e "import { chromium } from 'playwright'; const browser = await chromium.launch(); await browser.close();"; then echo "Chromium starts without installing system packages." else echo "::warning::Chromium did not start. Installing its system packages." yarn playwright install-deps chromium fi - name: E2E - run installation wizard test id: e2e-installation working-directory: v6 env: E2E_ADMIN_URL: http://localhost:3001 E2E_INSTALLATION: '1' E2E_TELEMETRY_DISABLED: '1' run: |- rm -f e2e/.e2e/summary.md yarn e2e --tag installation --reporter list,junit,markdown - name: E2E - installation - write job summary if: always() && steps.e2e-installation.outcome != 'skipped' working-directory: v6 run: |- if [ -f e2e/.e2e/summary.md ]; then echo "## E2E - installation" >> "$GITHUB_STEP_SUMMARY" cat e2e/.e2e/summary.md >> "$GITHUB_STEP_SUMMARY" fi - name: E2E - upload installation test results if: failure() uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f with: name: e2e-results-standalone-postgres-wcp-shard-${{ matrix.shard }} retention-days: 7 if-no-files-found: ignore include-hidden-files: true path: v6/e2e/.e2e - name: AI E2E - run tests id: ai-e2e-tests working-directory: v6 env: ANTHROPIC_API_KEY: ${{ secrets.E2E_ANTHROPIC_API_KEY }} E2E_ADMIN_URL: http://localhost:3001 E2E_API_URL: http://localhost:3002 E2E_TELEMETRY_DISABLED: '1' run: >- rm -f e2e/.e2e/summary.md if [ ! -f e2e/e2e.config.ts ]; then echo "::notice::This branch has no e2e/ folder. Skipping the AI E2E tests." exit 0 fi yarn e2e --exclude-tag installation --shard ${{ matrix.shard }}/3 --pass-with-no-tests --reporter list,junit,markdown - name: AI E2E - tests - write job summary if: always() && steps.ai-e2e-tests.outcome != 'skipped' working-directory: v6 run: |- if [ -f e2e/.e2e/summary.md ]; then echo "## AI E2E - tests" >> "$GITHUB_STEP_SUMMARY" cat e2e/.e2e/summary.md >> "$GITHUB_STEP_SUMMARY" fi - name: AI E2E - upload results if: always() uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f with: name: ai-e2e-results-standalone-postgres-wcp-shard-${{ matrix.shard }} retention-days: 7 if-no-files-found: ignore include-hidden-files: true path: v6/e2e/.e2e - name: Print server logs if: failure() run: >- for log in /tmp/webiny-api*.log /tmp/webiny-nginx-error.log; do [ -f "$log" ] || continue echo "::group::$log"; cat "$log"; echo "::endgroup::" done echo "::group::Admin log"; cat /tmp/webiny-admin.log || true; echo "::endgroup::" runs-on: ubuntu-latest env: NODE_OPTIONS: '--max_old_space_size=4096' YARN_ENABLE_IMMUTABLE_INSTALLS: false permissions: contents: read actions: write e2eTests-standalone-postgres-wcp-2-processes-build: needs: - e2eTests-standalone-publish name: E2E - Standalone (Postgres, 2 API processes, WCP) - Build services: postgres: image: postgres:17 env: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: webiny ports: - '5432:5432' options: >- --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 steps: - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 with: node-version: 24 - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 with: path: v6 - name: Resolve Yarn cache folder id: yarn-cache-folder working-directory: v6 run: echo "path=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: ${{ steps.yarn-cache-folder.outputs.path }} key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} restore-keys: yarn-${{ runner.os }}- - name: Install dependencies working-directory: v6 run: yarn --immutable - name: Download Verdaccio storage uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c with: name: verdaccio-storage - name: Extract Verdaccio storage run: tar -xf verdaccio-storage.tzst --use-compress-program=zstdmt -C "v6" - name: Start Verdaccio local server working-directory: v6 run: yarn add pm2 && npx pm2 start verdaccio -- -c .verdaccio.yaml - name: Configure NPM to use local registry run: npm config set registry http://localhost:4873 - name: Set git email run: git config --global user.email "webiny-bot@webiny.com" - name: Set git username run: git config --global user.name "webiny-bot" - name: Disable Webiny telemetry run: > mkdir ~/.webiny && echo '{ "id": "ci", "telemetry": false }' > ~/.webiny/config - name: Create a new standalone Webiny project run: >- npx create-webiny-project@local-npm new-webiny-project-standalone --tag local-npm --no-interactive --hosting-type standalone --assign-to-yarnrc '{"npmRegistryServer":"http://localhost:4873","unsafeHttpWhitelist":["localhost"]}' --template-options '{"storageOps":"postgres"}' - name: Configure the bug reporter in webiny.config.tsx working-directory: v6 run: >- node .github/workflows/wac/utils/runNodeScripts/configureBugReporter.js '${{ github.workspace }}/new-webiny-project-standalone' - name: Add the E2E API route to webiny.config.tsx working-directory: v6 run: >- node .github/workflows/wac/utils/runNodeScripts/configureApiRoute.js '${{ github.workspace }}/new-webiny-project-standalone' - name: Print CLI version working-directory: new-webiny-project-standalone run: yarn webiny --version - name: Build API and Admin working-directory: new-webiny-project-standalone env: WEBINY_HOSTING_TYPE: standalone WEBINY_API_URL: http://localhost:3002 BUG_REPORT_GITHUB_TOKEN: ${{ secrets.BUG_REPORT_GITHUB_TOKEN }} BUG_REPORT_REPOSITORY: ${{ vars.BUG_REPORT_REPOSITORY }} WEBINY_PROJECT_ID: ${{ secrets.E2E_WEBINY_PROJECT_ID }} WEBINY_PROJECT_API_KEY: ${{ secrets.E2E_WEBINY_PROJECT_API_KEY }} run: yarn webiny build api && yarn webiny build admin - name: Compress API and Admin builds run: >- tar -cf standalone-build-postgres-wcp-2-processes.tzst --use-compress-program=zstdmt new-webiny-project-standalone/.webiny/workspace/apps/api/graphql/build new-webiny-project-standalone/.webiny/workspace/apps/admin/build - name: Upload API and Admin builds uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a with: name: standalone-build-postgres-wcp-2-processes path: standalone-build-postgres-wcp-2-processes.tzst retention-days: 1 compression-level: 0 if-no-files-found: error overwrite: true runs-on: ubuntu-latest env: NODE_OPTIONS: '--max_old_space_size=4096' YARN_ENABLE_IMMUTABLE_INSTALLS: false permissions: contents: read actions: write e2eTests-standalone-postgres-wcp-2-processes: needs: - e2eTests-standalone-postgres-wcp-2-processes-build name: >- E2E - Standalone (Postgres, 2 API processes, WCP) / shard ${{ matrix.shard }} strategy: fail-fast: false matrix: shard: - 1 - 2 - 3 services: postgres: image: postgres:17 env: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: webiny ports: - '5432:5432' options: >- --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 valkey: image: valkey/valkey:8 ports: - '6379:6379' options: >- --health-cmd "valkey-cli ping" --health-interval 2s --health-timeout 2s --health-retries 15 steps: - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 with: node-version: 24 - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 with: path: v6 - name: Resolve Yarn cache folder id: yarn-cache-folder working-directory: v6 run: echo "path=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: ${{ steps.yarn-cache-folder.outputs.path }} key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} restore-keys: yarn-${{ runner.os }}- - name: Install dependencies working-directory: v6 run: yarn --immutable - name: Download API and Admin builds uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c with: name: standalone-build-postgres-wcp-2-processes - name: Extract API and Admin builds run: >- tar -xf standalone-build-postgres-wcp-2-processes.tzst --use-compress-program=zstdmt - name: Start 2 API processes env: WEBINY_PG_HOST: localhost WEBINY_PG_PORT: '5432' WEBINY_PG_USER: postgres WEBINY_PG_PASSWORD: postgres WEBINY_PG_DATABASE: webiny WEBINY_API_URL: http://localhost:3002 WEBINY_ADMIN_URL: http://localhost:3001 WEBINY_LOCAL_STORAGE_PATH: >- ${{ github.workspace }}/new-webiny-project-standalone/.webiny/storage WEBINY_UPLOAD_SECRET: e2e-upload-secret WEBINY_SELF_HOSTED_AUTH_SECRET: e2e-signing-secret WEBINY_ENCRYPTION_PASSPHRASE: e2e-encryption-passphrase WEBINY_HASHING_PEPPER: e2e-hashing-pepper WEBINY_PROJECT_ID: ${{ secrets.E2E_WEBINY_PROJECT_ID }} WEBINY_PROJECT_API_KEY: ${{ secrets.E2E_WEBINY_PROJECT_API_KEY }} WEBINY_REDIS_URL: redis://localhost:6379 run: >- mkdir -p "$(dirname "${WEBINY_SQL_FILENAME:-/tmp/unused}")" mkdir -p "${WEBINY_LOCAL_STORAGE_PATH:-/tmp/unused}" cd new-webiny-project-standalone/.webiny/workspace/apps/api/graphql/build PORT=3012 nohup node start.mjs > /tmp/webiny-api-1.log 2>&1 & PORT=3013 nohup node start.mjs > /tmp/webiny-api-2.log 2>&1 & echo "2 API processes starting" - name: Start nginx in front of the API processes run: >- set -euo pipefail command -v nginx > /dev/null || (sudo apt-get update && sudo apt-get install -y nginx) cat > /tmp/webiny-nginx.conf <<'NGINX' worker_processes 1; pid /tmp/webiny-nginx.pid; error_log /tmp/webiny-nginx-error.log; events {} http { access_log /tmp/webiny-nginx-access.log; client_max_body_size 0; map $http_upgrade $connection_upgrade { default upgrade; '' close; } upstream webiny_api { server 127.0.0.1:3012; server 127.0.0.1:3013; } server { listen 3002; location / { proxy_pass http://webiny_api; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; proxy_set_header Host $http_host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_request_buffering off; proxy_buffering off; } } } NGINX sudo nginx -t -c /tmp/webiny-nginx.conf sudo nginx -c /tmp/webiny-nginx.conf echo "nginx listening on port 3002" - name: Serve Admin run: >- nohup npx --yes serve -s new-webiny-project-standalone/.webiny/workspace/apps/admin/build -l 3001 > /tmp/webiny-admin.log 2>&1 & echo "Admin starting on port 3001" - name: Wait for API and Admin run: >- set -euo pipefail wait_for_port() { for _ in $(seq 1 90); do if (echo > /dev/tcp/127.0.0.1/"$1") >/dev/null 2>&1; then echo "port $1 is accepting connections" return 0 fi sleep 2 done echo "::error::Timed out waiting for port $1." return 1 } wait_for_port 3012 wait_for_port 3013 wait_for_port 3002 wait_for_port 3001 # A listening socket is not the same as a working GraphQL endpoint. curl -fsS -X POST http://localhost:3002/graphql -H 'content-type: application/json' \ -d '{"query":"{__typename}"}' > /dev/null echo "GraphQL API responded." - name: Resolve Playwright version id: playwright-version working-directory: v6 run: >- echo "version=$(yarn workspace e2e-tests playwright --version | cut -d' ' -f2)" >> $GITHUB_OUTPUT - name: Cache Playwright browsers uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: ~/.cache/ms-playwright key: >- playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }} - name: Install Playwright browser working-directory: v6/e2e run: >- yarn playwright install chromium if yarn node --input-type=module -e "import { chromium } from 'playwright'; const browser = await chromium.launch(); await browser.close();"; then echo "Chromium starts without installing system packages." else echo "::warning::Chromium did not start. Installing its system packages." yarn playwright install-deps chromium fi - name: E2E - run installation wizard test id: e2e-installation working-directory: v6 env: E2E_ADMIN_URL: http://localhost:3001 E2E_INSTALLATION: '1' E2E_TELEMETRY_DISABLED: '1' run: |- rm -f e2e/.e2e/summary.md yarn e2e --tag installation --reporter list,junit,markdown - name: E2E - installation - write job summary if: always() && steps.e2e-installation.outcome != 'skipped' working-directory: v6 run: |- if [ -f e2e/.e2e/summary.md ]; then echo "## E2E - installation" >> "$GITHUB_STEP_SUMMARY" cat e2e/.e2e/summary.md >> "$GITHUB_STEP_SUMMARY" fi - name: E2E - upload installation test results if: failure() uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f with: name: >- e2e-results-standalone-postgres-wcp-2-processes-shard-${{ matrix.shard }} retention-days: 7 if-no-files-found: ignore include-hidden-files: true path: v6/e2e/.e2e - name: AI E2E - run tests id: ai-e2e-tests working-directory: v6 env: ANTHROPIC_API_KEY: ${{ secrets.E2E_ANTHROPIC_API_KEY }} E2E_ADMIN_URL: http://localhost:3001 E2E_API_URL: http://localhost:3002 E2E_TELEMETRY_DISABLED: '1' run: >- rm -f e2e/.e2e/summary.md if [ ! -f e2e/e2e.config.ts ]; then echo "::notice::This branch has no e2e/ folder. Skipping the AI E2E tests." exit 0 fi yarn e2e --exclude-tag installation --shard ${{ matrix.shard }}/3 --pass-with-no-tests --reporter list,junit,markdown - name: AI E2E - tests - write job summary if: always() && steps.ai-e2e-tests.outcome != 'skipped' working-directory: v6 run: |- if [ -f e2e/.e2e/summary.md ]; then echo "## AI E2E - tests" >> "$GITHUB_STEP_SUMMARY" cat e2e/.e2e/summary.md >> "$GITHUB_STEP_SUMMARY" fi - name: AI E2E - upload results if: always() uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f with: name: >- ai-e2e-results-standalone-postgres-wcp-2-processes-shard-${{ matrix.shard }} retention-days: 7 if-no-files-found: ignore include-hidden-files: true path: v6/e2e/.e2e - name: Print server logs if: failure() run: >- for log in /tmp/webiny-api*.log /tmp/webiny-nginx-error.log; do [ -f "$log" ] || continue echo "::group::$log"; cat "$log"; echo "::endgroup::" done echo "::group::Admin log"; cat /tmp/webiny-admin.log || true; echo "::endgroup::" runs-on: ubuntu-latest env: NODE_OPTIONS: '--max_old_space_size=4096' YARN_ENABLE_IMMUTABLE_INSTALLS: false permissions: contents: read actions: write