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 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193
|
#/
# @license Apache-2.0
#
# Copyright (c) 2019 The Stdlib Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#/
# Define the triggers which will cause a build to run:
trigger:
# Define branch triggers:
branches:
# List branches for which changes will trigger a build:
include:
- master
- develop
# Define path triggers:
paths:
# List paths for which changes should trigger a build:
include:
- bin
- data
- include
- lib
- src
- "*.gyp"
- "*.gypi"
- manifest.json
# List paths for which changes should *not* trigger a build:
exclude:
- benchmark
- docs
- etc
- examples
- snippets
- package.json
- datapackage.json
- "*.md"
# Define pull request triggers which will cause a build to run:
pr:
# Define branch triggers:
branches:
# List branches against which PRs will trigger a build to run:
include:
- master
- develop
# Define path triggers:
paths:
# List paths for which changes should trigger a build:
include:
- bin
- data
- etc
- include
- lib
- src
- "*.gyp"
- "*.gypi"
- manifest.json
# List paths for which changes should *not* trigger a build:
exclude:
- benchmark
- docs
- examples
- snippets
- _tools
- package.json
- datapackage.json
- "*.md"
jobs:
- job: 'unit_tests_linux'
# Define a display name for use in the UI:
displayName: 'unit tests: linux'
# Define how long a job is allowed to run before timing out:
timeoutInMinutes: 360
# Define how long a job is allowed to cancel:
cancelTimeoutInMinutes: 5
# Specify the host environment:
pool:
vmImage: 'ubuntu-16.04'
# Define variable sets for parallel job execution:
strategy:
# Define the maximum number of parallel jobs:
maxParallel: 10
# Define variable sets which will be used to create separate jobs (one per variable set!):
matrix:
node_v16:
NODE_VERSION: '16'
NPM_VERSION: '>2.7.0'
node_v14:
NODE_VERSION: '14'
NPM_VERSION: '>2.7.0'
node_v12:
NODE_VERSION: '12'
NPM_VERSION: '>2.7.0'
node_v10:
NODE_VERSION: '10'
NPM_VERSION: '>2.7.0 <7.0.0'
node_v8:
NODE_VERSION: '8'
NPM_VERSION: '>2.7.0 <6.0.0'
node_v6:
NODE_VERSION: '6'
NPM_VERSION: '>2.7.0 <6.0.0'
node_v4:
NODE_VERSION: '4'
NPM_VERSION: '>2.7.0 <6.0.0'
steps:
# Configure clone settings:
- checkout: self
clean: false
fetchDepth: 100 # limit clone depth to the most recent 100 commits
lfs: false
# Install Node.js:
- task: NodeTool@0
# Define a UI display name:
displayName: 'Install Node.js'
# Define a task-specific timeout:
timeoutInMinutes: 5
# Define the Node.js version to install:
inputs:
versionSpec: '$(NODE_VERSION)'
# Update the npm client (older clients cannot handle scoped modules):
- task: Npm@1
# Define a UI display name:
displayName: 'Update npm'
# Define a task-specific timeout:
timeoutInMinutes: 5
# Update the global npm installation:
inputs:
command: custom
customCommand: 'install -g npm@"$(NPM_VERSION)"'
# Print debug information:
- task: bash@3
# Define a UI display name:
displayName: 'Debug info'
# Define a task-specific timeout:
timeoutInMinutes: 2
# Define the task inputs:
inputs:
targetType: inline
script: |
git --version
node --version
node -p 'process.platform + "@" + process.arch'
npm --version
npm config get registry
|