forked from jestjs/jest
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.azure-pipelines-steps.yml
45 lines (38 loc) · 1.19 KB
/
.azure-pipelines-steps.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
42
43
44
45
#
# Steps for building and testing Jest. See jobs defined in .azure-pipelines.yml
#
# Clones the repo
steps:
- checkout: self
# Ensure Node.js 10 is active
- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Use Node.js 10'
# Ensure Python 2.7 is active
- task: UsePythonVersion@0
inputs:
versionSpec: '2.7'
displayName: 'Use Python 2.7'
# Workaround to move source files under a "jest" folder (see .azure-pipelines.yml for details)
- script: |
cd /
mv $(Build.Repository.LocalPath) $(JEST_DIR)
mkdir $(Build.Repository.LocalPath)
displayName: 'Move source into jest folder'
# Run yarn to install dependencies and build
- script: yarn --frozen-lockfile
workingDirectory: $(JEST_DIR)
displayName: 'Install dependencies and build'
# Run test-ci-partial
- script: yarn run test-ci-partial
workingDirectory: $(JEST_DIR)
displayName: 'Run tests'
# Publish CI test results
- task: PublishTestResults@2
inputs:
testResultsFiles: '**/reports/junit/*.xml'
searchFolder: $(JEST_DIR)
testRunTitle: 'CI Tests $(Agent.OS)'
displayName: 'Publish test results'
condition: succeededOrFailed()