forked from facebook/create-react-app
-
Notifications
You must be signed in to change notification settings - Fork 1
/
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:
LinuxNode10: { vmImage: 'ubuntu-16.04', nodeVersion: 10.x }
LinuxNode12: { vmImage: 'ubuntu-16.04', nodeVersion: 12.x }
# WindowsNode10: { vmImage: 'windows-latest', nodeVersion: 10.x }
# WindowsNode12: { vmImage: 'windows-latest', nodeVersion: 12.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'