powerquery-formatter/azure-pipelines.yml

82 строки
1.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
trigger:
- master
pr:
- master
pool:
vmImage: 'windows-latest'
steps:
- task: NodeTool@0
inputs:
versionSpec: '16.x'
displayName: 'Install Node.js'
- task: Npm@1
displayName: 'npm install'
inputs:
command: 'install'
- task: Npm@1
displayName: 'build'
inputs:
command: 'custom'
customCommand: 'run build'
- task: Npm@1
displayName: 'npm test'
inputs:
command: 'custom'
customCommand: 'test'
- task: Npm@1
displayName: 'pack'
inputs:
command: 'custom'
customCommand: 'pack'
- task: CopyFiles@2
displayName: 'copy package to out directory'
inputs:
SourceFolder: '$(Build.SourcesDirectory)'
Contents: '*.tgz'
TargetFolder: '$(Build.SourcesDirectory)/out'
OverWrite: true
- task: PoliCheck@1
inputs:
inputType: 'Basic'
targetType: 'F'
targetArgument: 'src'
result: 'PoliCheck.xml'
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testRunner: JUnit
testResultsFiles: '**/test-results.xml'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(System.DefaultWorkingDirectory)/lib'
ArtifactName: lib
displayName: 'publish lib'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(System.DefaultWorkingDirectory)/out'
ArtifactName: out
displayName: 'publish out directory'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(System.DefaultWorkingDirectory)/../_sdt/logs/PoliCheck'
ArtifactName: PoliCheck
displayName: 'publish policheck results'