56 строки
1.2 KiB
YAML
56 строки
1.2 KiB
YAML
# Node.js
|
|
# Build a general Node.js project with npm.
|
|
# Add steps that analyze code, save build artifacts, deploy, and more:
|
|
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript
|
|
|
|
strategy:
|
|
matrix:
|
|
linux-node8:
|
|
imageName: 'ubuntu-latest'
|
|
nodeVersion: '8.x'
|
|
linux-node10:
|
|
imageName: 'ubuntu-latest'
|
|
nodeVersion: '10.x'
|
|
mac-node8:
|
|
imageName: 'macos-latest'
|
|
nodeVersion: '8.x'
|
|
mac-node10:
|
|
imageName: 'macos-latest'
|
|
nodeVersion: '10.x'
|
|
windows-node8:
|
|
imageName: 'windows-latest'
|
|
nodeVersion: '8.x'
|
|
windows-node10:
|
|
imageName: 'windows-latest'
|
|
nodeVersion: '10.x'
|
|
|
|
pool:
|
|
vmImage: $(imageName)
|
|
|
|
trigger:
|
|
branches:
|
|
include:
|
|
- master
|
|
- greenkeeper/*
|
|
pr:
|
|
- master
|
|
|
|
steps:
|
|
- task: NodeTool@0
|
|
inputs:
|
|
versionSpec: $(nodeVersion)
|
|
displayName: 'Install Node.js'
|
|
|
|
- script: npm install && npm install -g @angular/cli
|
|
displayName: 'Install dependencies'
|
|
|
|
- script: npm run build
|
|
displayName: 'Compile TypeScript and Build'
|
|
|
|
- script: npm run test:jest
|
|
displayName: 'Run jest unit tests'
|
|
|
|
# TODO: manage login to @azure/ng-deploy and az cli before enabling
|
|
#- script: bash -c "bash -c \"scripts/test.sh\""
|
|
# displayName: 'Run e2e tests'
|