forked from facebook/create-react-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines-test-job.yml
40 lines (34 loc) · 1.16 KB
/
azure-pipelines-test-job.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#
# Azure Pipelines job for building and testing create-react-app on Linux, Windows, and macOS.
#
parameters:
name: ''
testScript: ''
configurations:
LinuxNode8: { vmImage: 'ubuntu-16.04', nodeVersion: 8.x }
LinuxNode10: { vmImage: 'ubuntu-16.04', nodeVersion: 10.x }
# WindowsNode8: { vmImage: 'vs2017-win2016', nodeVersion: 8.x }
# WindowsNode10: { vmImage: 'vs2017-win2016', nodeVersion: 10.x }
jobs:
- job: ${{ parameters.name }}
strategy:
matrix:
${{ insert }}: ${{ parameters.configurations }}
pool:
vmImage: $(vmImage)
steps:
- script: |
git config --global core.autocrlf false
git config --global user.name "Create React App"
git config --global user.email "[email protected]"
displayName: 'Initialize Git config'
- checkout: self
path: create-react-app
- task: NodeTool@0
inputs:
versionSpec: $(nodeVersion)
displayName: 'Install Node.js'
- script: yarn --frozen-lockfile
displayName: 'Run yarn'
- bash: ${{ parameters.testScript }}
displayName: 'Run tests'