diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 54a835e157..1d4b725bf7 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -8,7 +8,11 @@ jobs: # 8-core runner so the 4 Playwright workers (see playwright.config.ts) have # CPU headroom alongside the app + ClickHouse + MongoDB — 4 workers # over-subscribed the 4-vCPU ubuntu-24.04 runner and caused timeouts. - runs-on: 8-core-playwright + # RUNNER_E2E is a label or a JSON array of labels. On a smaller + # runner, set the E2E_WORKERS variable to 2 as well. + runs-on: + ${{ startsWith(vars.RUNNER_E2E, '[') && fromJSON(vars.RUNNER_E2E) || + vars.RUNNER_E2E || '8-core-playwright' }} timeout-minutes: 15 permissions: contents: read @@ -25,6 +29,9 @@ jobs: uses: ./.github/actions/e2e-setup - name: Run Playwright tests (full-stack mode) + env: + # Unset falls back to the default in playwright.config.ts. + E2E_WORKERS: ${{ vars.E2E_WORKERS }} run: | cd packages/app yarn test:e2e --shard=${{ matrix.shard }}/4 diff --git a/.github/workflows/release-nightly.yml b/.github/workflows/release-nightly.yml index 3bd13af222..084a670e75 100644 --- a/.github/workflows/release-nightly.yml +++ b/.github/workflows/release-nightly.yml @@ -20,14 +20,18 @@ jobs: strategy: fail-fast: true matrix: + # runner is a label, or a JSON array of labels so the RUNNER_* repo + # variables can target self-hosted label sets. include: - arch: amd64 platform: linux/amd64 runner: ubuntu-latest - arch: arm64 platform: linux/arm64 - runner: ubuntu-latest-arm64 - runs-on: ${{ matrix.runner }} + runner: ${{ vars.RUNNER_ARM64 || 'ubuntu-latest-arm64' }} + runs-on: + ${{ startsWith(matrix.runner, '[') && fromJSON(matrix.runner) || + matrix.runner }} steps: - name: Checkout uses: actions/checkout@v6 @@ -92,11 +96,13 @@ jobs: include: - arch: amd64 platform: linux/amd64 - runner: Large-Runner-x64-32 + runner: ${{ vars.RUNNER_LARGE_X64 || 'Large-Runner-x64-32' }} - arch: arm64 platform: linux/arm64 - runner: Large-Runner-ARM64-32 - runs-on: ${{ matrix.runner }} + runner: ${{ vars.RUNNER_LARGE_ARM64 || 'Large-Runner-ARM64-32' }} + runs-on: + ${{ startsWith(matrix.runner, '[') && fromJSON(matrix.runner) || + matrix.runner }} steps: - name: Checkout uses: actions/checkout@v6 @@ -167,11 +173,13 @@ jobs: include: - arch: amd64 platform: linux/amd64 - runner: Large-Runner-x64-32 + runner: ${{ vars.RUNNER_LARGE_X64 || 'Large-Runner-x64-32' }} - arch: arm64 platform: linux/arm64 - runner: Large-Runner-ARM64-32 - runs-on: ${{ matrix.runner }} + runner: ${{ vars.RUNNER_LARGE_ARM64 || 'Large-Runner-ARM64-32' }} + runs-on: + ${{ startsWith(matrix.runner, '[') && fromJSON(matrix.runner) || + matrix.runner }} steps: - name: Checkout uses: actions/checkout@v6 @@ -244,11 +252,13 @@ jobs: include: - arch: amd64 platform: linux/amd64 - runner: Large-Runner-x64-32 + runner: ${{ vars.RUNNER_LARGE_X64 || 'Large-Runner-x64-32' }} - arch: arm64 platform: linux/arm64 - runner: Large-Runner-ARM64-32 - runs-on: ${{ matrix.runner }} + runner: ${{ vars.RUNNER_LARGE_ARM64 || 'Large-Runner-ARM64-32' }} + runs-on: + ${{ startsWith(matrix.runner, '[') && fromJSON(matrix.runner) || + matrix.runner }} steps: - name: Checkout uses: actions/checkout@v6 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ae52bf1b2e..525c519dc1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -798,14 +798,18 @@ jobs: strategy: fail-fast: true matrix: + # runner is a label, or a JSON array of labels so the RUNNER_* repo + # variables can target self-hosted label sets. include: - arch: amd64 platform: linux/amd64 runner: ubuntu-latest - arch: arm64 platform: linux/arm64 - runner: ubuntu-latest-arm64 - runs-on: ${{ matrix.runner }} + runner: ${{ vars.RUNNER_ARM64 || 'ubuntu-latest-arm64' }} + runs-on: + ${{ startsWith(matrix.runner, '[') && fromJSON(matrix.runner) || + matrix.runner }} steps: - name: Checkout uses: actions/checkout@v6 @@ -875,11 +879,13 @@ jobs: include: - arch: amd64 platform: linux/amd64 - runner: Large-Runner-x64-32 + runner: ${{ vars.RUNNER_LARGE_X64 || 'Large-Runner-x64-32' }} - arch: arm64 platform: linux/arm64 - runner: Large-Runner-ARM64-32 - runs-on: ${{ matrix.runner }} + runner: ${{ vars.RUNNER_LARGE_ARM64 || 'Large-Runner-ARM64-32' }} + runs-on: + ${{ startsWith(matrix.runner, '[') && fromJSON(matrix.runner) || + matrix.runner }} steps: - name: Checkout uses: actions/checkout@v6 @@ -958,11 +964,13 @@ jobs: include: - arch: amd64 platform: linux/amd64 - runner: Large-Runner-x64-32 + runner: ${{ vars.RUNNER_LARGE_X64 || 'Large-Runner-x64-32' }} - arch: arm64 platform: linux/arm64 - runner: Large-Runner-ARM64-32 - runs-on: ${{ matrix.runner }} + runner: ${{ vars.RUNNER_LARGE_ARM64 || 'Large-Runner-ARM64-32' }} + runs-on: + ${{ startsWith(matrix.runner, '[') && fromJSON(matrix.runner) || + matrix.runner }} steps: - name: Checkout uses: actions/checkout@v6 @@ -1064,11 +1072,13 @@ jobs: include: - arch: amd64 platform: linux/amd64 - runner: Large-Runner-x64-32 + runner: ${{ vars.RUNNER_LARGE_X64 || 'Large-Runner-x64-32' }} - arch: arm64 platform: linux/arm64 - runner: Large-Runner-ARM64-32 - runs-on: ${{ matrix.runner }} + runner: ${{ vars.RUNNER_LARGE_ARM64 || 'Large-Runner-ARM64-32' }} + runs-on: + ${{ startsWith(matrix.runner, '[') && fromJSON(matrix.runner) || + matrix.runner }} steps: - name: Checkout uses: actions/checkout@v6