forked from facebook/create-react-app
-
Notifications
You must be signed in to change notification settings - Fork 31
/
azure-pipelines-test-job.yml
41 lines (34 loc) · 1.04 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
41
#
# Azure Pipelines job for building and testing create-react-app on Linux, Windows, and macOS.
#
parameters:
name: ''
testScript: ''
configurations:
LinuxNode14: { vmImage: 'ubuntu-latest', nodeVersion: 14.x }
LinuxNode16: { vmImage: 'ubuntu-latest', nodeVersion: 16.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 "cra@email.com"
displayName: 'Initialize Git config'
- checkout: self
path: create-react-app
- task: NodeTool@0
inputs:
versionSpec: $(nodeVersion)
displayName: 'Install Node.js'
- script: npm i -g npm@8
displayName: 'Update npm to v8'
- script: npm ci
displayName: 'Run npm ci'
- bash: ${{ parameters.testScript }}
displayName: 'Run tests'