ci: reduce e2e-api-v2 test overhead with caching and Jest optimizations (#26331)
* perf: increase E2E test shards from 4 to 6 for faster CI Increase the number of parallel E2E test shards from 4 to 6 to reduce overall CI wall-clock time. Each shard runs on a separate 4-vCPU runner with 4 workers, so adding more shards increases total parallelism. This should reduce E2E test time from ~3 minutes per shard to ~2 minutes per shard by distributing tests across more parallel jobs. Co-Authored-By: [email protected] <[email protected]> * update * fix * update * readd * final update * fix flake --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
5 files changed
+31
-28
No files matched your search
@@ -18,7 +18,6 @@ const getMaxWorkers = () => {
|
||||
const maxWorkers = getMaxWorkers();
|
||||
|
||||
const config: Config = {
|
||||
preset: "ts-jest",
|
||||
moduleFileExtensions: ["js", "json", "ts"],
|
||||
rootDir: ".",
|
||||
moduleNameMapper: {
|
||||
@@ -28,7 +27,15 @@ const config: Config = {
|
||||
testEnvironment: "node",
|
||||
testRegex: ".e2e-spec.ts$",
|
||||
transform: {
|
||||
"^.+\\.ts$": "ts-jest",
|
||||
"^.+\\.ts$": [
|
||||
"ts-jest",
|
||||
process.env.CI
|
||||
? {
|
||||
isolatedModules: true,
|
||||
diagnostics: false,
|
||||
}
|
||||
: {},
|
||||
],
|
||||
},
|
||||
setupFiles: ["<rootDir>/test/setEnvVars.ts", "jest-date-mock"],
|
||||
setupFilesAfterEnv: ["<rootDir>/test/jest.setup-e2e.ts"],
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
"test:cov": "yarn dev:build && jest --coverage",
|
||||
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
|
||||
"test:e2e": "yarn dev:build && NODE_OPTIONS='--max_old_space_size=8192 --experimental-vm-modules' jest --ci --forceExit --config ./jest-e2e.ts",
|
||||
"test:e2e:ci": "NODE_OPTIONS='--max_old_space_size=8192 --experimental-vm-modules' jest --ci --forceExit --config ./jest-e2e.ts",
|
||||
"test:e2e:local": "yarn test:e2e --maxWorkers=4",
|
||||
"test:e2e:watch": "yarn dev:build && jest --runInBand --detectOpenHandles --forceExit --config ./jest-e2e.ts --watch",
|
||||
"prisma": "yarn workspace @calcom/prisma prisma",
|
||||
|
||||
@@ -43,7 +43,7 @@ import { plainToClass } from "class-transformer";
|
||||
import { Request } from "express";
|
||||
|
||||
import { SUCCESS_STATUS, X_CAL_CLIENT_ID } from "@calcom/platform-constants";
|
||||
import { OrgTeamOutputDto, type SkipTakePagination } from "@calcom/platform-types";
|
||||
import { OrgTeamOutputDto, SkipTakePagination } from "@calcom/platform-types";
|
||||
import type { Team } from "@calcom/prisma/client";
|
||||
|
||||
@Controller({
|
||||
|
||||
Reference in new issue
Block a user