diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 16ed6e537cc6..5123559d8742 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -60,7 +60,7 @@ jobs: if: ${{ needs.changes.outputs.cms == 'true' }} runs-on: ubuntu-latest strategy: - fail-fast: false # Let Cypress Cloud auto-cancellation handle failures + fail-fast: true matrix: machine: [1, 2, 3, 4] steps: diff --git a/cypress/run.mjs b/cypress/run.mjs index b98f333ac79e..e5103b735af7 100644 --- a/cypress/run.mjs +++ b/cypress/run.mjs @@ -12,8 +12,9 @@ async function runCypress() { const machineIndex = Number(process.env.MACHINE_INDEX || 0); const machineCount = Number(process.env.MACHINE_COUNT || 0); + const isFork = process.env.IS_FORK === 'true'; - if (machineIndex && machineCount) { + if (isFork && machineIndex && machineCount) { const specsPerMachine = Math.floor(specs.length / machineCount); const start = (machineIndex - 1) * specsPerMachine; const machineSpecs = @@ -22,7 +23,7 @@ async function runCypress() { : specs.slice(start, start + specsPerMachine); console.log( - `Sharding specs manually: machine ${machineIndex}/${machineCount} running ${machineSpecs.length} specs`, + `Sharding specs manually for fork: machine ${machineIndex}/${machineCount} running ${machineSpecs.length} specs`, ); args.push('--spec', machineSpecs.join(',')); } else { @@ -51,9 +52,6 @@ async function runCypress() { if (tags.length > 0) { args.push('--tag', tags.join(',')); } - - // Enable auto-cancellation to save CI time on failures - args.push('--auto-cancel-after-failures', '3'); } console.log('Running Cypress with args:', args.join(' '));