代码拉取完成,页面将自动刷新
variables:
YARN_CACHE_FOLDER: $(Pipeline.Workspace)/.yarn
strategy:
matrix:
linux:
imageName: 'ubuntu-16.04'
nodeVersion: '13.x'
mac:
imageName: 'macos-10.14'
nodeVersion: '13.x'
windows:
imageName: 'windows-2019'
nodeVersion: '13.x'
pool:
vmImage: $(imageName)
steps:
# Set node version
- task: NodeTool@0
inputs:
versionSpec: $(nodeVersion)
# Cache yarn deps
- task: Cache@2
inputs:
key: 'yarn | "$(Agent.OS)" | yarn.lock'
restoreKeys: |
yarn | "$(Agent.OS)"
yarn
path: $(YARN_CACHE_FOLDER)
displayName: Cache Yarn packages
# Start virtual framebuffer server
- bash: |
/usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
echo ">>> Started xvfb"
displayName: Start xvfb
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
# Install deps with yarn and run tests
- script: yarn --frozen-lockfile && yarn test-all
env:
DISPLAY: ':99.0'
# Generate coverage report
- script: yarn test --coverage --coverageReporters=cobertura
# Publish coverage report
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: $(System.DefaultWorkingDirectory)/coverage/cobertura-coverage.xml
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。