feat: v4.0.0 (#1016)

Co-authored-by: Denys Konovalov <kontakt@denyskon.de>
Co-authored-by: Mathieu COSYNS <64072917+Mathieu-COSYNS@users.noreply.github.com>
This commit is contained in:
Daniel Lautzenheiser
2024-01-03 15:14:09 -05:00
committed by GitHub
parent 682576ffc4
commit 799c7e6936
732 changed files with 48477 additions and 10886 deletions

41
cypress/run.mjs Normal file
View File

@ -0,0 +1,41 @@
import execa from 'execa';
import { globby } from 'globby';
async function runCypress() {
if (process.env.IS_FORK === 'true') {
const machineIndex = parseInt(process.env.MACHINE_INDEX);
const machineCount = parseInt(process.env.MACHINE_COUNT);
const specs = await globby(['cypress/integration/*spec*.js']);
const specsPerMachine = Math.floor(specs.length / machineCount);
const start = (machineIndex - 1) * specsPerMachine;
const machineSpecs =
machineIndex === machineCount
? specs.slice(start)
: specs.slice(start, start + specsPerMachine);
await execa(
'cypress',
['run', '--browser', 'chrome', '--headless', '--spec', machineSpecs.join(',')],
{ stdio: 'inherit', preferLocal: true },
);
} else {
await execa(
'cypress',
[
'run',
'--browser',
'chrome',
'--headless',
'--record',
'--parallel',
'--ci-build-id',
process.env.GITHUB_SHA,
'--group',
'GitHub CI',
],
{ stdio: 'inherit', preferLocal: true },
);
}
}
runCypress();