-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
azure-pipelines.template.yml
45 lines (42 loc) · 1.25 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
# 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_10:
node_version: 10
maxParallel: 1
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
displayName: 'Install Packages'
- script: |
npm run test:frontend
displayName: 'Build & Unit Test'
- ${{ if ne(parameters.name, 'windows') }}:
- script: |
npm i codecov && codecov
displayName: 'Report Coverage'