rsnext/azure-pipelines.yml
JJ Kasper fdd5f7391e
Add caching yarn cache to Azure (#8787)
* Add caching yarn cache to Azure

* bump

* Update cache key

* Apply suggestions from code review

Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>

* Remove extra check
2019-09-18 12:50:25 -05:00

42 lines
850 B
YAML

pool:
vmImage: 'vs2017-win2016'
variables:
NEXT_TELEMETRY_DISABLED: '1'
YARN_CACHE_FOLDER: $(Pipeline.Workspace)/.yarn
strategy:
maxParallel: 10
matrix:
node-10-1:
group: 1/4
node_version: ^10.10.0
node-10-2:
group: 2/4
node_version: ^10.10.0
node-10-3:
group: 3/4
node_version: ^10.10.0
node-10-4:
group: 4/4
node_version: ^10.10.0
steps:
- task: NodeTool@0
inputs:
versionSpec: $(node_version)
displayName: 'Install Node.js'
- task: CacheBeta@0
inputs:
key: yarn | $(Agent.OS) | yarn.lock
path: $(YARN_CACHE_FOLDER)
displayName: Cache Yarn packages
- script: |
yarn --frozen-lockfile --check-files
displayName: 'Install dependencies'
- script: |
node run-tests.js -c 2 -g $(group)
displayName: 'Run tests'