forked from Azure/azure-functions-nodejs-worker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathazure-pipelines.yml
More file actions
96 lines (92 loc) · 2.51 KB
/
Copy pathazure-pipelines.yml
File metadata and controls
96 lines (92 loc) · 2.51 KB
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
variables: {
WORKER_VERSION: '1.0.3',
NODE_LOWER_LTS: '8.x',
NODE_HIGHER_LTS: '10.x'
}
name: $(WORKER_VERSION)-$(Date:yyyyMMdd)$(Rev:.r)
trigger:
- master
- dev
jobs:
- job: UnitTests
strategy:
matrix:
UBUNTU_NODE8:
IMAGE_TYPE: 'ubuntu-latest'
NODE_VERSION: $(NODE_LOWER_LTS)
UBUNTU_NODE10:
IMAGE_TYPE: 'ubuntu-latest'
NODE_VERSION: $(NODE_HIGHER_LTS)
WINDOWS_NODE8:
IMAGE_TYPE: 'vs2017-win2016'
NODE_VERSION: $(NODE_LOWER_LTS)
WINDOWS_NODE10:
IMAGE_TYPE: 'vs2017-win2016'
NODE_VERSION: $(NODE_HIGHER_LTS)
MAC_NODE8:
IMAGE_TYPE: 'macos-10.13'
NODE_VERSION: $(NODE_LOWER_LTS)
MAC_NODE10:
IMAGE_TYPE: 'macos-10.13'
NODE_VERSION: $(NODE_HIGHER_LTS)
pool:
vmImage: $(IMAGE_TYPE)
steps:
- task: NodeTool@0
inputs:
versionSpec: $(NODE_VERSION)
displayName: 'Install Node.js for test'
- script: npm install
displayName: 'npm install'
- script: npm run build
displayName: 'npm run build'
- script: npm test
displayName: 'npm test'
- job: E2ETests
strategy:
maxParallel: 1
matrix:
NODE8:
NODE_VERSION: $(NODE_LOWER_LTS)
NODE10:
NODE_VERSION: $(NODE_HIGHER_LTS)
pool:
vmImage: 'vs2017-win2016'
steps:
- task: NodeTool@0
inputs:
versionSpec: $(NODE_VERSION)
displayName: 'Install Node.js for test'
- script: npm install
displayName: 'npm install'
- script: npm run build
displayName: 'npm run build'
- powershell: |
.\setup-e2e-tests.ps1
.\run-e2e-tests.ps1
env:
AzureWebJobsStorage: $(AzureWebJobsStorage)
AzureWebJobsEventHubSender: $(AzureWebJobsEventHubSender)
AzureWebJobsCosmosDBConnectionString: $(AzureWebJobsCosmosDBConnectionString)
FUNCTIONS_WORKER_RUNTIME: 'node'
languageWorkers:node:workerDirectory: $(System.DefaultWorkingDirectory)
displayName: 'Run E2E Tests'
- job: BuildArtifacts
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
pool:
vmImage: 'vs2017-win2016'
steps:
- task: NodeTool@0
inputs:
versionSpec: $(NODE_HIGHER_LTS)
displayName: 'Install Node.js for test'
- powershell: .\package.ps1
- task: NuGetCommand@2
inputs:
command: pack
packagesToPack: '$(System.DefaultWorkingDirectory)\pkg'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'