Skip to content

Commit

Permalink
chore: Slight update to CircleCI config (#36823)
Browse files Browse the repository at this point in the history
  • Loading branch information
LekoArts committed Oct 25, 2022
1 parent 8051184 commit db92b17
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
orbs:
win: circleci/windows@2.4.0
slack: circleci/slack@3.4.1

executors:
node:
Expand Down Expand Up @@ -99,6 +98,7 @@ aliases:
GENERATE_JEST_REPORT: "true"
JEST_JUNIT_OUTPUT_DIR: ./test-results/jest-node/
JEST_JUNIT_OUTPUT_NAME: results.xml
JEST_JUNIT_REPORT_TEST_SUITE_ERRORS: "true"
- store_test_results:
path: ./test-results/jest-node/

Expand Down Expand Up @@ -522,14 +522,15 @@ jobs:
yarn
- run:
name: Run tests
command: yarn jest --ci --runInBand ((yarn jest --listTests) | Foreach-Object {$_ -replace '.*\\packages', 'packages'} | Foreach-Object {$_ -replace '\\', '/'} | circleci tests split --split-by=timings)
command: yarn jest --ci --runInBand ((yarn jest --listTests) | Foreach-Object {$_ -replace '.*\\packages', 'packages'} | Foreach-Object {$_ -replace '\\', '/'} | circleci tests split)
no_output_timeout: 15m
environment:
NODE_OPTIONS: --max-old-space-size=2048
GENERATE_JEST_REPORT: "true"
COMPILER_OPTIONS: GATSBY_MAJOR=5
JEST_JUNIT_OUTPUT_DIR: ./test-results/jest-node/
JEST_JUNIT_OUTPUT_NAME: results.xml
JEST_JUNIT_REPORT_TEST_SUITE_ERRORS: "true"
- store_test_results:
path: ./test-results/jest-node/

Expand Down
6 changes: 3 additions & 3 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const ignoreDirs = [`<rootDir>/packages/gatsby-dev-cli/verdaccio`].concat(
)

const coverageDirs = pkgs.map(p => path.join(p, `src/**/*.js`))
const useCoverage = !!process.env.GENERATE_JEST_REPORT
const useJestUnit = !!process.env.GENERATE_JEST_REPORT

// list to add ESM to ignore
const esModules = [
Expand Down Expand Up @@ -145,9 +145,9 @@ module.exports = {
collectCoverageFrom: coverageDirs,
reporters: process.env.CI
? [[`jest-silent-reporter`, { useDots: true, showPaths: true }]].concat(
useCoverage ? `jest-junit` : []
useJestUnit ? `jest-junit` : []
)
: [`default`].concat(useCoverage ? `jest-junit` : []),
: [`default`].concat(useJestUnit ? `jest-junit` : []),
moduleFileExtensions: [`js`, `jsx`, `ts`, `tsx`, `json`],
setupFiles: [`<rootDir>/.jestSetup.js`],
setupFilesAfterEnv: [`jest-extended`],
Expand Down

0 comments on commit db92b17

Please sign in to comment.