-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
56 lines (46 loc) · 1.53 KB
/
azure-pipelines.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
50
51
52
53
54
55
56
# Node.js with Angular
# Build a Node.js project that uses Angular.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript
pool:
vmImage: 'Ubuntu 20.04'
steps:
- task: NodeTool@0
inputs:
versionSpec: '16.x'
displayName: 'Install Node.js'
- script: |
npm install -g @angular/cli
npm ci
displayName: 'npm install'
- script: |
ng build oocx-ng --prod
displayName: 'build library'
- script: |
ng build oocx-ng-demo --prod
displayName: 'build demo'
- script: |
ng test oocx-ng --watch=false --code-coverage --browsers=ChromeHeadless
displayName: 'run unit tests'
- task: PublishTestResults@2
inputs:
testResultsFiles: '**/TESTS-*.xml'
displayName: 'publish test results'
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: 'cobertura'
summaryFileLocation: '$(System.DefaultWorkingDirectory)/coverage/cobertura-coverage.xml'
reportDirectory: '$(System.DefaultWorkingDirectory)/coverage'
displayName: 'publish code coverage results'
- script: |
cp README.md dist/oocx-ng
cp projects/oocx-ng/src/lib/*.less dist/oocx-ng
cd dist/oocx-ng
../../node_modules/.bin/semantic-release
displayName: 'publish package'
- task: AzureCLI@1
inputs:
azureSubscription: 'startliste-oocx-ng-2021'
scriptLocation: 'inlineScript'
inlineScript: 'az storage blob upload-batch --destination \$web --account-name oocxng --source dist/oocx-ng-demo'
displayName: 'publish demo site to Azure'