/
azure-test-pipelines.yml
90 lines (73 loc) · 2.92 KB
/
azure-test-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
84
85
86
87
88
89
90
trigger:
- main
pr:
drafts: false
branches:
include:
- main
variables:
- group: iTwin.js non-secret config variables
- group: iTwins Client Integration Test Users
jobs:
- job: Node_16_x
condition: succeeded()
pool:
vmImage: ubuntu-latest
steps:
- task: NodeTool@0
displayName: "Use Node 16.x"
inputs:
versionSpec: "16.x"
checkLatest: true
- bash: |
# All of these variables are,
# 1. Set in the "Variables" tab with a slightly different name (dropped "test" from each one)
# 2. Use the "Environment Variables" section below, and remapped to a new name
# 3. Set as the correct name below
#
# This is done so that we can keep the values secret within the build pipeline but then decrypt them in the environment when actually running the tests.
# > A better solution would be to figure out how to decrypt in Node itself
echo "##vso[task.setvariable variable=imjs_itwin_test_user_password;]$test_itwin_password"
echo "##vso[task.setvariable variable=USER_WITH_ACCESS_PASSWORD;]$test_itwin_password"
displayName: 'Add config to environment'
env:
test_itwin_password: $(imjs_itwin_user_password)
- script: npm install -g pnpm@6.19.0
displayName: install pnpm globally
- script: pnpm install
displayName: 'Install dependencies'
- script: pnpm run build
displayName: 'Build'
- script: pnpm run test
displayName: 'Test'
- job: Node_14_x
condition: succeeded()
pool:
vmImage: ubuntu-latest
steps:
- task: NodeTool@0
displayName: "Use Node 14.x"
inputs:
versionSpec: "14.x"
checkLatest: true
- bash: |
# All of these variables are,
# 1. Set in the "Variables" tab with a slightly different name (dropped "test" from each one)
# 2. Use the "Environment Variables" section below, and remapped to a new name
# 3. Set as the correct name below
#
# This is done so that we can keep the values secret within the build pipeline but then decrypt them in the environment when actually running the tests.
# > A better solution would be to figure out how to decrypt in Node itself
echo "##vso[task.setvariable variable=imjs_itwin_test_user_password;]$test_itwin_password"
echo "##vso[task.setvariable variable=USER_WITH_ACCESS_PASSWORD;]$test_itwin_password"
displayName: 'Add config to environment'
env:
test_itwin_password: $(imjs_itwin_user_password)
- script: npm install -g pnpm@6.19.0
displayName: install pnpm globally
- script: pnpm install
displayName: 'Install dependencies'
- script: pnpm run build
displayName: 'Build'
- script: pnpm run test
displayName: 'Test'