This repository has been archived by the owner on Oct 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathazure-pipelines.yml
83 lines (68 loc) · 1.75 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
pool:
vmImage: 'ubuntu-latest'
variables:
CI: true
YARN_CACHE_FOLDER: $(Pipeline.Workspace)/.yarn
THIS_MONTH: $[format('{0:yyyyMM}', pipeline.startTime)]
trigger:
branches:
include:
- '*'
tags:
include:
- '*'
steps:
- checkout: self
fetchDepth: 1
- task: NodeTool@0
inputs:
versionSpec: '>=12.3.1'
displayName: 'Install Node.js'
- task: Cache@2
inputs:
key: $(THIS_MONTH) | yarn | $(Agent.OS) | yarn.lock
path: $(YARN_CACHE_FOLDER)
restoreKeys: |
$(THIS_MONTH) | yarn | $(Agent.OS)
$(THIS_MONTH) | yarn
displayName: Cache Yarn packages
- script: |
yarn install --frozen-lockfile
displayName: 'yarn install'
- script: |
yarn lint
displayName: 'Lint'
- script: |
yarn workspace web typecheck
yarn workspace worker typecheck
displayName: 'Typecheck'
- script: |
yarn workspace web test:ci
displayName: 'Unit test'
- script: |
yarn workspace web build
displayName: 'Build'
- task: CopyFiles@2
inputs:
targetFolder: '$(Build.ArtifactStagingDirectory)'
Contents: packages/web/build/**/*
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: drop
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testRunner: JUnit
testResultsFiles: '**/junit.xml'
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/cobertura-coverage.xml'
reportDirectory: '$(System.DefaultWorkingDirectory)/**/coverage'
- script: |
cat ./packages/**/coverage/lcov.info | yarn coveralls
displayName: 'Publish code coverage to Coveralls'
continueOnError: true
env:
COVERALLS_REPO_TOKEN: $(coverageServiceToken)