# 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: Pull Requests 'on': pull_request concurrency: group: pr-${{ github.event.pull_request.number }} 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 }} is-fork-pr: ${{ steps.is-fork-pr.outputs.is-fork-pr }} changed-packages: ${{ steps.detect-changed-packages.outputs.changed-packages }} latest-webiny-version: ${{ steps.latest-webiny-version.outputs.latest-webiny-version }} 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.base_ref }}-${{ 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" - name: Is a PR from a fork id: is-fork-pr run: >- echo "is-fork-pr=${{ github.event.pull_request.head.repo.fork }}" >> "$GITHUB_OUTPUT" - name: Detect changed files id: detect-changed-files uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d with: filters: | changed: - 'packages/**/*' list-files: json - name: Detect changed packages id: detect-changed-packages run: >- echo "changed-packages=$(node .github/workflows/wac/utils/runNodeScripts/listChangedPackages.js '${{ steps.detect-changed-files.outputs.changed_files }}')" >> "$GITHUB_OUTPUT" - name: Get latest Webiny version on NPM id: latest-webiny-version run: >- echo "latest-webiny-version=$(npm view @webiny/cli version)" >> "$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: ${{ github.base_ref }} - name: Resolve Yarn cache folder id: yarn-cache-folder working-directory: ${{ github.base_ref }} 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: ${{ github.base_ref }}/.webiny/cached-packages key: ${{ needs.constants.outputs.global-cache-key }} - name: Install dependencies run: yarn --immutable working-directory: ${{ github.base_ref }} - name: Build packages run: yarn build working-directory: ${{ github.base_ref }} - uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 with: path: ${{ github.base_ref }}/.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 buildProject: needs: - constants - build name: Build project (core, api, admin) env: NODE_OPTIONS: '--max_old_space_size=4096' YARN_ENABLE_IMMUTABLE_INSTALLS: false WEBINY_INFRA_API_MAX_BUNDLE_SIZE: ${{ vars.WEBINY_INFRA_API_MAX_BUNDLE_SIZE }} steps: - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 with: node-version: 24 - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 with: path: ${{ github.base_ref }} - name: Resolve Yarn cache folder id: yarn-cache-folder working-directory: ${{ github.base_ref }} 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: ${{ github.base_ref }}/.webiny/cached-packages key: ${{ needs.constants.outputs.run-cache-key }} - name: Install dependencies run: yarn --immutable working-directory: ${{ github.base_ref }} - name: Build packages run: yarn build working-directory: ${{ github.base_ref }} - name: Build core run: yarn webiny build core working-directory: ${{ github.base_ref }} - name: API bundle size limit run: >- echo "API bundle size limit: ${WEBINY_INFRA_API_MAX_BUNDLE_SIZE:-6291456} bytes" - name: Build api run: yarn webiny build api --no-deployment-checks working-directory: ${{ github.base_ref }} - name: Build admin run: yarn webiny build admin --no-deployment-checks working-directory: ${{ github.base_ref }} runs-on: ubuntu-latest permissions: contents: read actions: write staticCodeAnalysis: needs: - constants name: Static code analysis steps: - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 with: node-version: 24 - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 with: path: ${{ github.base_ref }} - name: Resolve Yarn cache folder id: yarn-cache-folder working-directory: ${{ github.base_ref }} 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: ${{ github.base_ref }}/.webiny/cached-packages key: ${{ needs.constants.outputs.run-cache-key }} - name: Install dependencies run: yarn --immutable working-directory: ${{ github.base_ref }} - name: Check code formatting run: yarn format:check working-directory: ${{ github.base_ref }} - name: Check dependencies run: yarn adio working-directory: ${{ github.base_ref }} - name: Check TS configs run: yarn check-ts-configs working-directory: ${{ github.base_ref }} - name: Lint run: yarn lint working-directory: ${{ github.base_ref }} - name: Check Package Node Modules run: yarn check:node-modules:ci working-directory: ${{ github.base_ref }} - name: Validate webiny package run: yarn webiny-scripts validate-webiny-package working-directory: ${{ github.base_ref }} 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: ${{ github.base_ref }} - name: Resolve Yarn cache folder id: yarn-cache-folder working-directory: ${{ github.base_ref }} 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: ${{ github.base_ref }}/.webiny/cached-packages key: ${{ needs.constants.outputs.run-cache-key }} - name: Install dependencies run: yarn --immutable working-directory: ${{ github.base_ref }} - name: Build packages run: yarn build working-directory: ${{ github.base_ref }} - name: Sync Dependencies Verification run: yarn verify-dependencies working-directory: ${{ github.base_ref }} 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: ${{ github.base_ref }} - name: Resolve Yarn cache folder id: yarn-cache-folder working-directory: ${{ github.base_ref }} 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: ${{ github.base_ref }} - name: Check types for E2E tests run: yarn e2e:ts working-directory: ${{ github.base_ref }} env: NODE_OPTIONS: '--max_old_space_size=4096' YARN_ENABLE_IMMUTABLE_INSTALLS: false permissions: contents: read actions: write vitest-constants: needs: - constants - 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: ${{ github.base_ref }} - id: list-vitest-test-commands name: List Vitest Test Commands working-directory: ${{ github.base_ref }} run: >- echo "vitest-test-commands=$(node .github/workflows/wac/utils/runNodeScripts/listVitestTestCommands.js '["", ${{ needs.constants.outputs.changed-packages }}]')" >> "$GITHUB_OUTPUT" - name: Packages to test with Vitest id: list-packages run: >- echo '${{ steps.list-vitest-test-commands.outputs.vitest-test-commands }}' 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 - build - 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 if: needs.vitest-constants.outputs.vitest-test-commands != '[]' 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: ${{ github.base_ref }} - name: Resolve Yarn cache folder id: yarn-cache-folder working-directory: ${{ github.base_ref }} 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: ${{ github.base_ref }}/.webiny/cached-packages key: ${{ needs.constants.outputs.run-cache-key }} - name: Install dependencies run: yarn --immutable working-directory: ${{ github.base_ref }} - name: Build packages run: yarn build working-directory: ${{ github.base_ref }} - name: Run tests run: ${{ matrix.testCommand.cmd }} working-directory: ${{ github.base_ref }} permissions: contents: read actions: write vitest-ddb-constants: needs: - constants - 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: ${{ github.base_ref }} - id: list-vitest-test-commands name: List Vitest Test Commands working-directory: ${{ github.base_ref }} run: >- echo "vitest-test-commands=$(node .github/workflows/wac/utils/runNodeScripts/listVitestTestCommands.js '["ddb", ${{ needs.constants.outputs.changed-packages }}]')" >> "$GITHUB_OUTPUT" - name: Packages to test with Vitest id: list-packages run: >- echo '${{ steps.list-vitest-test-commands.outputs.vitest-test-commands }}' 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 - build - 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 if: needs.vitest-ddb-constants.outputs.vitest-test-commands != '[]' 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: ${{ github.base_ref }} - name: Resolve Yarn cache folder id: yarn-cache-folder working-directory: ${{ github.base_ref }} 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: ${{ github.base_ref }}/.webiny/cached-packages key: ${{ needs.constants.outputs.run-cache-key }} - name: Install dependencies run: yarn --immutable working-directory: ${{ github.base_ref }} - name: Build packages run: yarn build working-directory: ${{ github.base_ref }} - name: Run tests run: ${{ matrix.testCommand.cmd }} working-directory: ${{ github.base_ref }} permissions: contents: read actions: write id-token: write vitest-ddb-os-constants: needs: - constants - 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: ${{ github.base_ref }} - id: list-vitest-test-commands name: List Vitest Test Commands working-directory: ${{ github.base_ref }} run: >- echo "vitest-test-commands=$(node .github/workflows/wac/utils/runNodeScripts/listVitestTestCommands.js '["ddb-os,ddb", ${{ needs.constants.outputs.changed-packages }}]')" >> "$GITHUB_OUTPUT" - name: Packages to test with Vitest id: list-packages run: >- echo '${{ steps.list-vitest-test-commands.outputs.vitest-test-commands }}' 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 - build - 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 if: >- needs.vitest-ddb-os-constants.outputs.vitest-test-commands != '[]' && needs.constants.outputs.is-fork-pr != 'true' 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: ${{ github.base_ref }} - name: Resolve Yarn cache folder id: yarn-cache-folder working-directory: ${{ github.base_ref }} 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: ${{ github.base_ref }}/.webiny/cached-packages key: ${{ needs.constants.outputs.run-cache-key }} - name: Install dependencies run: yarn --immutable working-directory: ${{ github.base_ref }} - name: Build packages run: yarn build working-directory: ${{ github.base_ref }} - 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: ${{ github.base_ref }} permissions: contents: read actions: write id-token: write vitest-sql-constants: needs: - constants - 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: ${{ github.base_ref }} - id: list-vitest-test-commands name: List Vitest Test Commands working-directory: ${{ github.base_ref }} run: >- echo "vitest-test-commands=$(node .github/workflows/wac/utils/runNodeScripts/listVitestTestCommands.js '["sql", ${{ needs.constants.outputs.changed-packages }}]')" >> "$GITHUB_OUTPUT" - name: Packages to test with Vitest id: list-packages run: >- echo '${{ steps.list-vitest-test-commands.outputs.vitest-test-commands }}' 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 - build - 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 if: needs.vitest-sql-constants.outputs.vitest-test-commands != '[]' 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: ${{ github.base_ref }} - name: Resolve Yarn cache folder id: yarn-cache-folder working-directory: ${{ github.base_ref }} 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: ${{ github.base_ref }}/.webiny/cached-packages key: ${{ needs.constants.outputs.run-cache-key }} - name: Install dependencies run: yarn --immutable working-directory: ${{ github.base_ref }} - name: Build packages run: yarn build working-directory: ${{ github.base_ref }} - name: Run tests run: ${{ matrix.testCommand.cmd }} working-directory: ${{ github.base_ref }} permissions: contents: read actions: write id-token: write vitest-pg-constants: needs: - constants - 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: ${{ github.base_ref }} - id: list-vitest-test-commands name: List Vitest Test Commands working-directory: ${{ github.base_ref }} run: >- echo "vitest-test-commands=$(node .github/workflows/wac/utils/runNodeScripts/listVitestTestCommands.js '["pg,sql", ${{ needs.constants.outputs.changed-packages }}]')" >> "$GITHUB_OUTPUT" - name: Packages to test with Vitest id: list-packages run: >- echo '${{ steps.list-vitest-test-commands.outputs.vitest-test-commands }}' 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 - build - 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 if: needs.vitest-pg-constants.outputs.vitest-test-commands != '[]' 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: ${{ github.base_ref }} - name: Resolve Yarn cache folder id: yarn-cache-folder working-directory: ${{ github.base_ref }} 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: ${{ github.base_ref }}/.webiny/cached-packages key: ${{ needs.constants.outputs.run-cache-key }} - name: Install dependencies run: yarn --immutable working-directory: ${{ github.base_ref }} - name: Build packages run: yarn build working-directory: ${{ github.base_ref }} - name: Run tests run: ${{ matrix.testCommand.cmd }} working-directory: ${{ github.base_ref }} permissions: contents: read actions: write id-token: write