代码拉取完成,页面将自动刷新
# Node.js with Angular
# Build a Node.js project that uses Angular.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
stages:
- stage: env
jobs:
- job: Nodes
steps:
- task: NodeTool@0
inputs:
versionSpec: '12.13.1'
displayName: 'Install Node.js'
- stage: build
jobs:
- job: build_site
steps:
- task: Npm@1
inputs:
command: 'install'
- script: |
npm run build
export DEPLOY_DOMAIN=https://preview-${SYSTEM_PULLREQUEST_PULLREQUESTNUMBER}-ng-zorro-antd.surge.sh
echo 'version' >> dist/.surgeignore
echo 'issue-helper' >> dist/.surgeignore
npx surge --project ./dist --domain $DEPLOY_DOMAIN
tar czvf build.tgz lib dist
- task: CopyFiles@2
inputs:
contents: build.tgz
targetFolder: $(Build.ArtifactStagingDirectory)
displayName: 'Copy archives to artifacts staging directory'
- task: PublishBuildArtifacts@1
inputs:
path: $(Build.ArtifactStagingDirectory)
displayName: 'Upload artifacts'
dependsOn: env
- stage: test
jobs:
- job: test_components
steps:
- task: Npm@1
inputs:
command: 'install'
- script: |
npm run test
cat ./coverage-report/lcov.info | ./node_modules/.bin/codecov
- task: PublishCodeCoverageResults@1
displayName: 'publish code coverage results'
condition: succeededOrFailed()
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: $(System.DefaultWorkingDirectory)/coverage-report/cobertura-coverage.xml
reportDirectory: $(System.DefaultWorkingDirectory)/coverage-report
failIfCoverageEmpty: true
- task: PublishTestResults@2
displayName: 'publish test results'
condition: succeededOrFailed()
inputs:
searchFolder: $(System.DefaultWorkingDirectory)/junit
failTaskOnFailedTests: true
testRunTitle: NG-ZORRO
testResultsFormat: JUnit
testResultsFiles: "**/TESTS*.xml"
- job: test_schematics
steps:
- task: Npm@1
inputs:
command: 'install'
- script: npm run test:schematics
dependsOn: env
- stage: lint
jobs:
- job: lint_components
steps:
- task: Npm@1
inputs:
command: 'install'
- script: npm run lint
dependsOn: env
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。