azure-storage-js/azure-pipelines.yml

167 строки
4.7 KiB
YAML

# Node.js
# Build a general Node.js project with npm.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript
# https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema
jobs:
- job: blobnodejslinux
displayName: Blob Linux
pool:
vmImage: "ubuntu-16.04"
strategy:
matrix:
node_6_x:
node_version: 6.x
node_8_x:
node_version: 8.x
node_10_x:
node_version: 10.x
steps:
- task: NodeTool@0
inputs:
versionSpec: "$(node_version)"
displayName: "Install Node.js"
- script: |
npm install
npm run build
workingDirectory: "./blob"
displayName: "npm install and build"
- script: |
npm run test:node
workingDirectory: "./blob"
displayName: "npm run test:node"
env: { ACCOUNT_NAME: "$(ACCOUNT-NAME)", ACCOUNT_KEY: "$(ACCOUNT-KEY)" }
- task: PublishTestResults@2
inputs:
testRunner: JUnit
testResultsFiles: "./blob/test-results.xml"
condition: succeededOrFailed()
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: "$(System.DefaultWorkingDirectory)/**/*coverage.xml"
reportDirectory: "$(System.DefaultWorkingDirectory)/**/coverage"
- job: blobnodejswin
displayName: Blob Windows
pool:
vmImage: "vs2017-win2016"
strategy:
matrix:
node_6_x:
node_version: 6.x
node_8_x:
node_version: 8.x
node_10_x:
node_version: 10.x
steps:
- task: NodeTool@0
inputs:
versionSpec: "$(node_version)"
displayName: "Install Node.js"
- script: |
npm install
npm run build
workingDirectory: "./blob"
displayName: "npm install and build"
- script: |
npm run test:node
workingDirectory: "./blob"
displayName: "npm run test:node"
env: { ACCOUNT_NAME: "$(ACCOUNT-NAME)", ACCOUNT_KEY: "$(ACCOUNT-KEY)" }
- task: PublishTestResults@2
inputs:
testRunner: JUnit
testResultsFiles: "./blob/test-results.xml"
condition: succeededOrFailed()
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: "$(System.DefaultWorkingDirectory)/**/*coverage.xml"
reportDirectory: "$(System.DefaultWorkingDirectory)/**/coverage"
- job: blobnodejsmac
displayName: Blob Mac
pool:
vmImage: "macOS-10.13"
strategy:
matrix:
node_6_x:
node_version: 6.x
node_8_x:
node_version: 8.x
node_10_x:
node_version: 10.x
steps:
- task: NodeTool@0
inputs:
versionSpec: "$(node_version)"
displayName: "Install Node.js"
- script: |
npm install
npm run build
workingDirectory: "./blob"
displayName: "npm install and build"
- script: |
npm run test:node
workingDirectory: "./blob"
displayName: "npm run test:node"
env: { ACCOUNT_NAME: "$(ACCOUNT-NAME)", ACCOUNT_KEY: "$(ACCOUNT-KEY)" }
- task: PublishTestResults@2
inputs:
testRunner: JUnit
testResultsFiles: "./blob/test-results.xml"
condition: succeededOrFailed()
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: "$(System.DefaultWorkingDirectory)/**/*coverage.xml"
reportDirectory: "$(System.DefaultWorkingDirectory)/**/coverage"
- job: blobbrowser
displayName: Blob Browser
pool:
vmImage: "Ubuntu 16.04"
steps:
- task: NodeTool@0
inputs:
versionSpec: "10.x"
displayName: "Install Node.js"
- script: |
npm install
npm run build
workingDirectory: "./blob"
displayName: "npm install and build"
- script: |
npm run test:browser
workingDirectory: "./blob"
displayName: "npm run test:browser"
env: { ACCOUNT_NAME: "$(ACCOUNT-NAME)", ACCOUNT_SAS: "$(ACCOUNT-SAS)" }
- task: PublishTestResults@2
inputs:
testRunner: JUnit
testResultsFiles: "./blob/test-results.browser.xml"
condition: succeededOrFailed()
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: "$(System.DefaultWorkingDirectory)/**/*coverage.xml"
reportDirectory: "$(System.DefaultWorkingDirectory)/**/coverage-browser"