Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 3 additions & 5 deletions cypress/run.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand All @@ -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 {
Expand Down Expand Up @@ -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(' '));
Expand Down