mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2026-06-22 20:00:39 +00:00
95f28442c3
Docker / build-and-push (backend) (push) Has been cancelled
Docker / build-and-push (frontend) (push) Has been cancelled
E2E Tests / backend-sqlite (push) Has been cancelled
E2E Tests / backend-mariadb (push) Has been cancelled
E2E Tests / backend-postgres (push) Has been cancelled
Lint and check format / Lint files and check formatting (push) Has been cancelled
REUSE Compliance Check / reuse (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
Static Analysis / Njsscan code scanning (push) Has been cancelled
Static Analysis / CodeQL analysis (javascript) (push) Has been cancelled
Run tests & build / Test and build with NodeJS 24 (push) Has been cancelled
The backend end-to-end tests run with many parallel workers that each start a full NestJS application including database connection pools, HTTP server and so on. This can easily result in performance bottlenecks - which is even the reason why we added the --runInBand option for the CI. The performance can be improved by constraining the number of workers and memory allocated per worker in our jest config. Furthermore, we can forcefully close open HTTP connections in the test cleanup. This terminates connections with a keepalive flag, that would persist for a while longer otherwise. The following `this.app.close()` waits for keepalive requests, so this reduces the wait time. Signed-off-by: Erik Michelson <github@erik.michelson.eu>
26 lines
559 B
JSON
26 lines
559 B
JSON
{
|
|
"moduleFileExtensions": ["js", "json", "ts"],
|
|
"rootDir": ".",
|
|
"automock": false,
|
|
"testEnvironment": "node",
|
|
"testMatch": ["<rootDir>/test/**/*.e2e-spec.{ts,js}"],
|
|
"transform": {
|
|
"^.+\\.(t|j)s$": [
|
|
"ts-jest",
|
|
{
|
|
"tsconfig": "test/tsconfig.json",
|
|
"diagnostics": {
|
|
"ignoreCodes": [
|
|
151002
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"coverageDirectory": "./coverage-e2e",
|
|
"testTimeout": 15000,
|
|
"reporters": ["default", "github-actions"],
|
|
"maxWorkers": 4,
|
|
"workerIdleMemoryLimit": "1GB"
|
|
}
|