-
Notifications
You must be signed in to change notification settings - Fork 57
Expand file tree
/
Copy pathvalidate-examples-regression-sample.yml
More file actions
50 lines (41 loc) · 1.4 KB
/
validate-examples-regression-sample.yml
File metadata and controls
50 lines (41 loc) · 1.4 KB
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
46
47
48
49
50
pool:
vmImage: "Ubuntu 20.04"
trigger:
- master
pr:
branches:
include:
- "*"
steps:
- task: Npm@1
displayName: "npm ci"
inputs:
command: ci
verbose: false
- task: Npm@1
displayName: "npm run slow-test-sample"
inputs:
command: custom
verbose: false
customCommand: run slow-test-sample
- task: PublishTestResults@2
inputs:
testResultsFiles: "**/test-results.xml"
testRunTitle: "Test results for JavaScript"
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: "$(System.DefaultWorkingDirectory)/**/*coverage.xml"
reportDirectory: "$(System.DefaultWorkingDirectory)/**/coverage"
# this command will return non zero if git repo has changes ie if the snapshots have been updated
- script: echo "If this step fails, go to the published artifacts apply the patch provided to your local git repo using `git apply <file>`" && git status && git diff-index --quiet HEAD --
displayName: Fail test if snapshots have been updated
condition: always()
- script: git diff > $(Build.ArtifactStagingDirectory)/snapshot.patch
displayName: Publish jest update snapshot patch
condition: always()
- task: PublishBuildArtifacts@1
condition: always()
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)/snapshot.patch
artifactName: "snapshot-patch"