diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5485af33..c3bfcace 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -33,7 +33,7 @@ jobs: - name: Build Apps run: yarn run build:apps - name: Test - run: yarn run test + run: yarn run test:ci env: DEBUG_PRINT_LIMIT: 50000 - name: Archive test artifacts diff --git a/examples/discovery-search-app/package.json b/examples/discovery-search-app/package.json index b075e1d7..51793cee 100644 --- a/examples/discovery-search-app/package.json +++ b/examples/discovery-search-app/package.json @@ -13,8 +13,10 @@ "start": "yarn setup && cross-env SKIP_PREFLIGHT_CHECK=true SASS_PATH=${PWD}/src react-scripts start", "lint": "yarn run g:eslint --quiet '{src,cypress}/**/*.{js,jsx,ts,tsx}' './*.{js,jsx,ts,tsx}'", "test:e2e": "cross-env REACT_APP_CYPRESS_MODE=true BROWSER=none CYPRESS_baseUrl=http://localhost:3000 start-server-and-test start http://localhost:3000 'cypress run'", - "test:unit": "cross-env SKIP_PREFLIGHT_CHECK=true CI=1 react-scripts test --env=jsdom", + "test:unit": "cross-env SKIP_PREFLIGHT_CHECK=true react-scripts test --env=jsdom", + "test:unit:ci": "yarn run test:unit --runInBand", "test": "yarn test:unit && yarn test:e2e", + "test:ci": "yarn test:unit:ci && yarn test:e2e", "cypress": "cross-env REACT_APP_CYPRESS_MODE=true cypress open --e2e --browser chrome", "server": "yarn server:setup && yarn server:run", "server:run": "node ./server.js", diff --git a/package.json b/package.json index fc2cbeaa..6fe9a34a 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "build:pkgs": "yarn workspaces foreach -Av --parallel --include '@ibm-watson/*' run build", "build:apps": "yarn workspaces foreach -Av --parallel run build:app", "test": "yarn workspaces foreach -Av --parallel run test", + "test:ci": "yarn workspaces foreach -Av run test:ci", "g:analyze": "cd $INIT_CWD && source-map-explorer", "g:eslint": "cd $INIT_CWD && eslint" }, diff --git a/packages/discovery-react-components/package.json b/packages/discovery-react-components/package.json index 45c38ba3..cd9d3db2 100644 --- a/packages/discovery-react-components/package.json +++ b/packages/discovery-react-components/package.json @@ -18,9 +18,10 @@ "scripts": { "prepack": "yarn run build", "prepublish": "yarn run build", - "test": "cross-env SKIP_PREFLIGHT_CHECK=true CI=1 react-scripts test --env ./src/fixedJSDOMEnvironment.js", - "test:coverage": "cross-env CI=1 SKIP_PREFLIGHT_CHECK=true react-scripts test --env ./src/fixedJSDOMEnvironment.js --coverage", - "test:watch": "cross-env SKIP_PREFLIGHT_CHECK=true react-scripts test --env ./src/fixedJSDOMEnvironment.js --watch", + "test": "cross-env SKIP_PREFLIGHT_CHECK=true react-scripts test --env ./src/fixedJSDOMEnvironment.js", + "test:ci": "yarn run test --runInBand", + "test:coverage": "yarn run test --coverage", + "test:watch": "yarn run test --watch", "test:debug": "cross-env SKIP_PREFLIGHT_CHECK=true react-scripts --inspect-brk test --env ./src/fixedJSDOMEnvironment.js --runInBand --no-cache", "circular": "madge --circular src/*", "build": "tsc && vite build",