-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines-OLD.yml
129 lines (104 loc) · 3.56 KB
/
azure-pipelines-OLD.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#For now comment out the other Linux versions
#TODO: Add the ver 9 and 10 nightly builds and figure out how to let them fail
jobs:
- job: BuildLinuxOS
strategy:
maxParallel: 10
matrix:
#Node0.10:
#NODE_VERSION: '0.10'
#Node0.12:
#NODE_VERSION: '0.12'
#Node1.8:
#NODE_VERSION: '1.8'
#Node2.5:
#NODE_VERSION: '2.5'
#Node3.3:
#NODE_VERSION: '3.3'
#Node4.9:
#NODE_VERSION: '4.9'
#Node5.12:
#NODE_VERSION: '5.12'
#Node6.14:
#NODE_VERSION: '6.14'
#Node7.10:
#NODE_VERSION: '7.10'
Node8.12:
NODE_VERSION: '8.12'
Node9:
NODE_VERSION: '9.x'
pool:
vmImage: 'ubuntu-16.04'
steps:
#Before Install Scripts
- script: |
npm config set shrinkwrap false
displayName: 'Configure npm: Skip updating shrinkwrap / lock'
- script: |
npm rm --silent --save-dev connect-redis
displayName: 'Remove all non-test dependencies: Remove example dependencies'
- script: |
if [[ "$(cut -d. -f1 <<< "$(NODE_VERSION)")" -lt 6 ]]; then
npm install --silent --save-dev [email protected]
fi
displayName: 'Setup Node.js version-specific dependencies: mocha for testing: use 3.x for Node.js < 6'
- script: |
if [[ "$(cut -d. -f1 <<< "$(NODE_VERSION)")" -lt 4 ]]; then
npm install --silent --save-dev [email protected]
fi
displayName: 'Setup Node.js version-specific dependencies: supertest for http calls: use 2.0.0 for Node.js < 4'
- script: |
if [[ -d node_modules ]]; then
npm prune
npm rebuild
fi
displayName: 'Setup Node.js version-specific dependencies: Update Node.js modules: Prune and rebuild node_modules'
#Finished With Before Install. Time to install dependencies
#These two steps are required because the language command in Travis sets the node version,
#and also does an npm install and an npm test
- task: NodeTool@0
displayName: 'Node Tool install $(NODE_VERSION)'
inputs:
versionSpec: '$(NODE_VERSION)'
- task: Npm@1
displayName: 'npm install'
inputs:
verbose: false
#TODO: This step may not be needed, as it seems to partially duplicate the npm run test-ci step.
#- script: |
# npm test
# displayName: 'npm test'
# continueOnError: $[eq(variables['CanFail'], true)]
#Testing
- script: |
npm run test-ci
displayName: 'Run test script'
# continueOnError: $[eq(variables['CanFail'], true)]
- script: |
npm run lint
displayName: 'Run linting'
# continueOnError: $[eq(variables['CanFail'], true)]
#after_script:
- task: qetza.replacetokens.replacetokens-task.replacetokens@3
displayName: 'Replace tokens in **/.coveralls.yml'
inputs:
targetFiles: '.coveralls.yml'
keepToken: true
tokenPrefix: '___'
tokenSuffix: '___'
- script: |
npm install --save-dev [email protected]
node_modules/.bin/coveralls < ./coverage/lcov.info
displayName: 'Upload coverage to coveralls'
#Copy coverage artifacts to staging and publish them
- task: CopyFiles@2
displayName: 'Copy coverage Files To Staging'
inputs:
SourceFolder: '$(build.sourcesdirectory)/coverage'
TargetFolder: '$(build.artifactstagingdirectory)'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifacts'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)'
#TODO: Need to add a publish test results, potentially? I don't know how helpful it will be.
#I don't think there are actual test results to publish.