Skip to content

Commit

Permalink
chore: remove CircleCI support as no longer necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillgroshkov committed May 30, 2024
1 parent 0962269 commit f5e9aea
Show file tree
Hide file tree
Showing 4 changed files with 148 additions and 156 deletions.
2 changes: 1 addition & 1 deletion cfg/_cnst.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
prettierDirs: [
'src,scripts,e2e,playwright,docs,cfg,resources,.circleci,.github,public,static,components,content,layouts,pages,plugins,middleware,store,blocks',
'src,scripts,e2e,playwright,docs,cfg,resources,.github,public,static,components,content,layouts,pages,plugins,middleware,store,blocks',
],
// ts,tsx,css,scss excluded, cause they need to run in special order (overlap between >1 tool):
prettierExtensionsExclusive: 'js,jsx,json,md,graphql,yml,yaml,html',
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ adds `--silent` (and `JEST_SILENT` env var) if all tests are run.

- `test`: runs unit tests (all tests _except_ `*.integration.test.ts` and `*.manual.test.ts`).
Detects `CI` env variable, adds `--coverage` if in CI. Uses `default` reporter in `!CI`, otherwise
`jest-junit` reporter. Includes fix for "CircleCI out of memory issue"
`jest-junit` reporter.
- `test-integration`: runs `*.integration.test.ts` with `jest.integration-test.config.js` config.
- `test-manual`: runs `*.manual.test.ts` with `jest.manual-test.config.js`.
- `test-leaks`: runs Jest with `--logHeapUsage --detectOpenHandles --detectLeaks`.
Expand Down
14 changes: 2 additions & 12 deletions src/util/jest.util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export function runJest(opt: RunJestOpt = {}): void {

const {
CI,
CIRCLECI,
CPU_LIMIT,
TZ = 'UTC',
APP_ENV,
Expand Down Expand Up @@ -97,17 +96,8 @@ export function runJest(opt: RunJestOpt = {}): void {
args.push('--coverage')
}

if (!maxWorkers) {
if (cpuLimit && cpuLimit > 1) {
maxWorkers = `--maxWorkers=${cpuLimit - 1}`
} else if (CIRCLECI) {
// We used to default to 2, but due to memory being an issue for Jest - now we default to 1,
// as it's the most memory-efficient way
// Since `workerIdleMemoryLimit` was introduced by default - we're changing default back to 2 workers
// We now only do it for CircleCI (not for CI in general), as it reports cpus as 36
// Github Actions don't do that and report correct number of cpus
maxWorkers = '--maxWorkers=2'
}
if (!maxWorkers && cpuLimit && cpuLimit > 1) {
maxWorkers = `--maxWorkers=${cpuLimit - 1}`
}
}

Expand Down
Loading

0 comments on commit f5e9aea

Please sign in to comment.