Skip to content

Commit

Permalink
ci(jest): use different args for node (#15074)
Browse files Browse the repository at this point in the history
  • Loading branch information
viceice committed Apr 12, 2022
1 parent 0a26456 commit 3ab24f9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
run: yarn build

- name: Unit tests
run: yarn jest --maxWorkers=2 --ci --coverage ${{ env.coverage }}
run: yarn jest:${{ env.NODE_VERSION }} --maxWorkers=2 --ci --coverage ${{ env.coverage }}

- name: Codecov
uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # renovate: tag=v2.1.0
Expand Down
2 changes: 2 additions & 0 deletions lib/logger/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ let curMeta: Record<string, unknown> = {};

const problems = new ProblemStream();

// istanbul ignore if: not easily testable
if (is.string(process.env.LOG_LEVEL)) {
process.env.LOG_LEVEL = process.env.LOG_LEVEL.toLowerCase().trim();
}

validateLogLevel(process.env.LOG_LEVEL);
const stdout: bunyan.Stream = {
name: 'stdout',
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
"generate": "run-s generate:*",
"generate:imports": "node tools/generate-imports.mjs",
"git-check": "node tools/check-git-version.mjs",
"jest": "cross-env LOG_LEVEL=fatal node --expose-gc --no-compilation-cache node_modules/jest/bin/jest.js --logHeapUsage",
"jest": "cross-env LOG_LEVEL=fatal node --expose-gc node_modules/jest/bin/jest.js --logHeapUsage",
"jest:14": "node --expose-gc node_modules/jest/bin/jest.js --logHeapUsage",
"jest:16": "node --expose-gc --no-compilation-cache node_modules/jest/bin/jest.js --logHeapUsage",
"jest-debug": "cross-env NODE_OPTIONS=--inspect-brk yarn jest --testTimeout=100000000",
"jest-silent": "cross-env yarn jest --reporters jest-silent-reporter",
"lint": "run-s ls-lint eslint prettier markdown-lint git-check doc-fence-check",
Expand Down

0 comments on commit 3ab24f9

Please sign in to comment.