/
.azure-pipelines-steps.yml
38 lines (32 loc) · 1.05 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
steps:
- script: npm i -g npm@$(npm_version)
displayName: Use legacy npm version $(npm_version)
condition: ne(variables['npm_version'], '')
- task: NodeTool@0
inputs:
versionSpec: '$(node_version)'
displayName: Use Node $(node_version)
- script: npm install
displayName: npm install
- script: npm test
displayName: Run tests
- script: npm run coveralls
displayName: Run coveralls
env:
# Pretend to be AppVeyor for now
APPVEYOR: true
APPVEYOR_BUILD_NUMBER: $(Build.BuildNumber)
APPVEYOR_BUILD_ID: $(Agent.OS)_$(node_version)
APPVEYOR_REPO_COMMIT: $(Build.SourceVersion)
APPVEYOR_REPO_BRANCH: $(Build.SourceBranchName)
# Overwrite the GitLab Service Name
COVERALLS_SERVICE_NAME: Azure Pipelines
COVERALLS_REPO_TOKEN: $(COVERALLS_REPO_TOKEN_SECRET)
COVERALLS_PARALLEL: true
CI_PULL_REQUEST: $(System.PullRequest.PullRequestNumber)
- script: npm run azure-pipelines
displayName: Write tests to xml
- task: PublishTestResults@2
inputs:
testResultsFiles: '**/test.xunit'
condition: succeededOrFailed()