Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

Commit d2787b8

Browse files
committed
change how to set max workers in CI
1 parent 3e74de1 commit d2787b8

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
command: yarn prettier
4646
- run:
4747
name: Unit Tests
48-
command: yarn test --maxWorkers=2
48+
command: yarn test
4949
- run:
5050
name: Report coverage
5151
command: bash <(curl -s https://codecov.io/bash)

azure-pipelines.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,17 @@ trigger: [master]
1010
pool:
1111
vmImage: 'ubuntu-latest'
1212

13-
steps:
14-
- task: ComponentGovernanceComponentDetection@0
15-
inputs:
16-
scanType: 'Register'
17-
verbosity: 'Verbose'
18-
alertWarningLevel: 'High'
19-
displayName: Component governance registration
13+
variables:
14+
# emulate circleci method of detecting whether build is running in CI or local
15+
CI: 1
2016

17+
steps:
18+
- task: ComponentGovernanceComponentDetection@0
19+
inputs:
20+
scanType: 'Register'
21+
verbosity: 'Verbose'
22+
alertWarningLevel: 'High'
23+
displayName: Component governance registration
2124
# Rest of build is not being used for now, but leaving setup for reference
2225

2326
# - task: NodeTool@0

build/gulp/tasks/test-unit.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ const jestConfigFromArgv: Partial<JestPluginConfig> = {
1818
testFilePattern: argv.testFilePattern as string,
1919
}
2020

21+
if (process.env.CI) {
22+
jestConfigFromArgv.maxWorkers = 2
23+
}
24+
2125
task(
2226
'test:jest:setup',
2327
parallel('build:docs:component-info', 'build:docs:component-menu-behaviors'),

0 commit comments

Comments
 (0)