forked from eggjs/egg-multipart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.template.yml
49 lines (46 loc) · 1.35 KB
/
azure-pipelines.template.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
# Node.js
# Build a general Node.js application with npm.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/vsts/pipelines/languages/javascript
# demo: https://github.com/parcel-bundler/parcel/blob/master/azure-pipelines-template.yml
jobs:
- job: ${{ parameters.name }}
pool:
vmImage: ${{ parameters.vmImage }}
strategy:
matrix:
node_8:
node_version: 8
node_10:
node_version: 10
node_12:
node_version: 12
maxParallel: 3
steps:
- task: NodeTool@0
inputs:
versionSpec: $(node_version)
displayName: 'Install Node.js'
# Set ENV
- ${{ if ne(parameters.name, 'windows') }}:
- script: |
echo $PWD
export PATH="$PATH:$PWD/node_modules/.bin"
echo "##vso[task.setvariable variable=PATH]$PATH"
displayName: Set ENV
- ${{ if eq(parameters.name, 'windows') }}:
- script: |
echo %cd%
set PATH=%PATH%;%cd%\node_modules\.bin
echo "##vso[task.setvariable variable=PATH]%PATH%"
displayName: Set ENV
- script: |
npm i npminstall && npminstall
displayName: 'Install Packages'
- script: |
npm run ci-windows
displayName: 'Build & Unit Test'
- ${{ if ne(parameters.name, 'windows') }}:
- script: |
npminstall codecov && codecov
displayName: 'Report Coverage'