From 15d08a86c6d29423adda33bf74d60bbb8b095bcd Mon Sep 17 00:00:00 2001 From: Diego Rodrigues de Sa e Souza <8016841+diegosouzapw@users.noreply.github.com> Date: Fri, 10 Jul 2026 07:23:06 -0300 Subject: [PATCH] =?UTF-8?q?ci(quality):=20shard=20unit=20fast-path=202?= =?UTF-8?q?=E2=86=924=20=E2=80=94=20halves=20the=20heaviest=20job's=20wall?= =?UTF-8?q?=20time=20(#6781)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/quality.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index d1e765cb79..7b10170301 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -130,15 +130,17 @@ jobs: - run: npm run test:vitest fast-unit: - name: Unit Tests fast-path (${{ matrix.shard }}/2) + name: Unit Tests fast-path (${{ matrix.shard }}/4) # Dynamic runner — see fast-gates (own-origin + flag; fork/unset → ubuntu-latest). - # This is the heaviest fast-path job (~9min on ubuntu-latest); the 32-core VPS - # cuts it to ~2-3min when the flag is on. + # This is the heaviest fast-path job; 4-way sharding (was 2) halves the critical + # path again (~8.5min → ~4.5min on ubuntu-latest; ~2min on the 8-slot runner box). + # Node's native --test-shard=N/total takes any denominator — only this matrix and + # the TEST_SHARD env below encode the shard count. runs-on: ${{ (vars.USE_VPS_RUNNER == 'true' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)) && fromJSON('["self-hosted","omni-release"]') || 'ubuntu-latest' }} strategy: fail-fast: false matrix: - shard: [1, 2] + shard: [1, 2, 3, 4] env: JWT_SECRET: ci-lint-secret-with-sufficient-length-for-validation API_KEY_SECRET: ci-lint-api-key-secret-long @@ -157,7 +159,7 @@ jobs: # silenciosamente não rodavam no fast path) e o setupPolyfill não era importado. - run: npm run test:unit:ci:shard env: - TEST_SHARD: ${{ matrix.shard }}/2 + TEST_SHARD: ${{ matrix.shard }}/4 # ── Pacote 4 (plano mestre testes+CI, aprovado 2026-07-04) ───────────────────────── # No-new-warnings por PR via ESLint bulk suppressions nativo (>=9.24). O baseline