| 1 |
steps: |
| 2 |
- script: npm i -g npm@$(npm_version) |
| 3 |
displayName: Use legacy npm version $(npm_version) |
| 4 |
condition: ne(variables['npm_version'], '') |
| 5 |
|
| 6 |
- task: NodeTool@0 |
| 7 |
inputs: |
| 8 |
versionSpec: '$(node_version)' |
| 9 |
displayName: Use Node $(node_version) |
| 10 |
|
| 11 |
- script: npm install |
| 12 |
displayName: npm install |
| 13 |
|
| 14 |
- script: npm test |
| 15 |
displayName: Run tests |
| 16 |
|
| 17 |
- script: npm run coveralls |
| 18 |
displayName: Run coveralls |
| 19 |
env: |
| 20 |
|
| 21 |
APPVEYOR: true |
| 22 |
APPVEYOR_BUILD_NUMBER: $(Build.BuildNumber) |
| 23 |
APPVEYOR_BUILD_ID: $(Agent.OS)_$(node_version) |
| 24 |
APPVEYOR_REPO_COMMIT: $(Build.SourceVersion) |
| 25 |
APPVEYOR_REPO_BRANCH: $(Build.SourceBranchName) |
| 26 |
|
| 27 |
COVERALLS_SERVICE_NAME: Azure Pipelines |
| 28 |
COVERALLS_REPO_TOKEN: $(COVERALLS_REPO_TOKEN_SECRET) |
| 29 |
COVERALLS_PARALLEL: true |
| 30 |
CI_PULL_REQUEST: $(System.PullRequest.PullRequestNumber) |
| 31 |
|
| 32 |
- script: npm run azure-pipelines |
| 33 |
displayName: Write tests to xml |
| 34 |
|
| 35 |
- task: PublishTestResults@2 |
| 36 |
inputs: |
| 37 |
testResultsFiles: '**/test.xunit' |
| 38 |
condition: succeededOrFailed() |