oav/.ci/validate-examples-regressio...

50 строки
1.4 KiB
YAML

pool:
vmImage: "Ubuntu 16.04"
trigger:
- master
pr:
branches:
include:
- "*"
steps:
- task: Npm@1
displayName: "npm install"
inputs:
verbose: false
- task: Npm@1
displayName: "npm run slow-test"
inputs:
command: custom
verbose: false
customCommand: run slow-test
- 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 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"