This repository has been archived by the owner on Jun 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path.vsts-ci.yml
80 lines (68 loc) · 2 KB
/
.vsts-ci.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
resources:
containers:
- container: node
image: node:9.11.1
- container: node-alpine
image: node:9.11.1-alpine
phases:
- phase: Build
queue: Hosted Linux Preview
steps:
- bash: npm install -g yarn && yarn
displayName: yarn install
- bash: yarn build
displayName: yarn build
- bash: tar -czf cache.tar dist node_modules
displayName: Archive Build Artifacts
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: $(Build.SourcesDirectory)/cache.tar
artifactName: cache
artifactType: container
- phase: UnitTest
dependsOn: Build
queue:
name: Hosted Linux Preview
parallel: 2
matrix:
Quality:
cmd: ./node_modules/yarn/bin/yarn lint
name: yarn lint
Unit:
cmd: ./node_modules/yarn/bin/yarn test ./tests/unit/**/*.spec.ts
name: yarn test
DB_CONN_STRING: $(CosmosConnStr)
steps:
- task: DownloadBuildArtifacts@0
displayName: Restore Packages
inputs:
artifactName: cache
downloadPath: $(Build.SourcesDirectory)
- bash: tar -xzf $BUILD_SOURCESDIRECTORY/cache/cache.tar -C $BUILD_SOURCESDIRECTORY
displayName: Extract cache
- bash: $(cmd)
displayName: Run Test
- phase: IntegrationTest
dependsOn: UnitTest
queue:
name: Hosted Linux Preview
parallel: 2
matrix:
IntegrationTestCosmos:
cmd: ./node_modules/yarn/bin/yarn test ./tests/integration/**/*.spec.ts
name: cosmos system test
DB_CONN_STRING: $(CosmosConnStr)
IntegrationTestMongo:
cmd: ./node_modules/yarn/bin/yarn test ./tests/integration/**/*.spec.ts
name: mongo system test
DB_CONN_STRING: mongodb://localhost:27017/configdb
steps:
- task: DownloadBuildArtifacts@0
displayName: Restore Packages
inputs:
artifactName: cache
downloadPath: $(Build.SourcesDirectory)
- bash: tar -xzf $BUILD_SOURCESDIRECTORY/cache/cache.tar -C $BUILD_SOURCESDIRECTORY
displayName: Extract cache
- bash: $(cmd)
displayName: Run Test