70 строки
1.6 KiB
YAML
70 строки
1.6 KiB
YAML
trigger:
|
|
- master
|
|
|
|
jobs:
|
|
- job: Test
|
|
pool:
|
|
vmImage: 'Ubuntu 16.04'
|
|
strategy:
|
|
matrix:
|
|
Node8:
|
|
node.version: 8.x
|
|
Node10:
|
|
node.version: 10.x
|
|
Node12:
|
|
node.version: 12.x
|
|
steps:
|
|
- task: NodeTool@0
|
|
displayName: 'Install Node'
|
|
inputs:
|
|
versionSpec: $(node.version)
|
|
- script: npm install
|
|
- task: Npm@1
|
|
displayName: 'npm test'
|
|
inputs:
|
|
command: custom
|
|
verbose: false
|
|
customCommand: 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'
|
|
- job: Build
|
|
pool:
|
|
vmImage: 'Ubuntu 16.04'
|
|
steps:
|
|
- task: Npm@1
|
|
displayName: 'npm pack'
|
|
inputs:
|
|
command: custom
|
|
verbose: false
|
|
customCommand: pack
|
|
- task: CopyFiles@2
|
|
displayName: 'Copy Files to: drop'
|
|
inputs:
|
|
Contents: '*.tgz'
|
|
TargetFolder: drop
|
|
- task: PublishBuildArtifacts@1
|
|
inputs:
|
|
pathtoPublish: $(Build.SourcesDirectory)/drop
|
|
- job: Check_PackageJson_Version_Number
|
|
pool:
|
|
vmImage: 'Ubuntu 16.04'
|
|
steps:
|
|
- task: Npm@1
|
|
displayName: 'npm install'
|
|
inputs:
|
|
command: custom
|
|
verbose: false
|
|
customCommand: install
|
|
- task: Npm@1
|
|
displayName: 'npm run check:packagejsonversion -- --azure-devops'
|
|
inputs:
|
|
command: custom
|
|
verbose: false
|
|
customCommand: run check:packagejsonversion -- --azure-devops |