-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathazure-pipelines.yml
73 lines (61 loc) · 1.81 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Varsom app build script
# https://aka.ms/yaml
trigger:
- develop
pool:
vmImage: 'ubuntu-latest'
variables:
- group: sentryProperties
- name: npm_config_cache
value: $(Pipeline.Workspace)/.npm
steps:
- task: NodeTool@0
displayName: 'Use Node 18.20.x'
inputs:
versionSpec: 18.20.x
checkLatest: false
- task: Cache@2
inputs:
key: 'npm | "$(Agent.OS)" | package-lock.json'
restoreKeys: |
npm | "$(Agent.OS)"
path: $(npm_config_cache)
displayName: Cache npm
- script: npm ci
- task: DownloadSecureFile@1
displayName: 'Download secure file'
inputs:
secureFile: '8a4eb7ac-653f-40c8-a421-d0a145352828'
retryCount: 5
- task: CopyFiles@2
displayName: 'Copy Files to: ./src/assets'
inputs:
SourceFolder: '$(Agent.TempDirectory)'
Contents: apikey.json
TargetFolder: ./src/assets
# We need version.json when we run the tests
- task: Npm@1
displayName: 'npm create version file and update AndroidManifest.xml and plist.info'
inputs:
command: custom
verbose: false
customCommand: 'run create-version-file'
- task: Npm@1
displayName: 'npm run tests'
inputs:
command: custom
verbose: false
customCommand: 'run test-ci'
- task: PublishTestResults@2
displayName: 'Publish Test Results **/TESTS-*.xml'
condition: succeededOrFailed()
inputs:
testResultsFiles: '**/TESTS-*.xml'
- task: PublishCodeCoverageResults@1
displayName: 'Publish code coverage from **/cobertura-coverage.xml'
condition: succeededOrFailed()
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/coverage/cobertura-coverage.xml'
reportDirectory: '$(System.DefaultWorkingDirectory)/coverage'
failIfCoverageEmpty: true