forked from Hartmarken348/github
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
204 lines (195 loc) · 6.32 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
trigger:
branches:
include:
- master
- '*-releases'
pr:
branches:
include:
- '*'
jobs:
- job: Linux
pool:
vmImage: ubuntu-16.04
variables:
display: ":99"
atom_channel: dev
atom_name: atom-dev
steps:
- template: script/azure-pipelines/linux-install.yml
parameters:
atom_channel: $(atom_channel)
atom_name: $(atom_name)
- bash: |
"/tmp/atom/usr/bin/${ATOM_NAME}" --test test/
displayName: run tests
env:
TEST_JUNIT_XML_PATH: $(Agent.HomeDirectory)/test-results.xml
ATOM_GITHUB_BABEL_ENV: coverage
FORCE_COLOR: 0
MOCHA_TIMEOUT: 60000
UNTIL_TIMEOUT: 30000
- task: PublishTestResults@2
inputs:
testResultsFormat: JUnit
testResultsFiles: $(Agent.HomeDirectory)/test-results.xml
testRunTitle: Linux $(atom_channel)
condition: succeededOrFailed()
- bash: npm run report:coverage
displayName: generate code coverage reports
condition: succeededOrFailed()
- bash: >
bash <(curl -s https://codecov.io/bash)
-n "Linux $(atom_channel)"
-P "${SYSTEM_PULLREQUEST_PULLREQUESTNUMBER:-}"
-B "${SYSTEM_PULLREQUEST_SOURCEBRANCH:-${BUILD_SOURCEBRANCH}}"
displayName: publish code coverage to CodeCov
env:
CODECOV_TOKEN: $(codecov.token)
condition: succeededOrFailed()
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: cobertura
summaryFileLocation: $(System.DefaultWorkingDirectory)/coverage/cobertura-coverage.xml
reportDirectory: $(System.DefaultworkingDirectory)/coverage/
condition: succeededOrFailed()
- job: MacOS
pool:
vmImage: macos-10.13
variables:
atom_channel: dev
atom_app: Atom Dev.app
steps:
- template: script/azure-pipelines/macos-install.yml
parameters:
atom_channel: $(atom_channel)
atom_app: $(atom_app)
- bash: |
"/tmp/atom/${ATOM_APP}/Contents/Resources/app/atom.sh" --test test/
displayName: run tests
env:
TEST_JUNIT_XML_PATH: $(Agent.HomeDirectory)/test-results.xml
ATOM_GITHUB_BABEL_ENV: coverage
FORCE_COLOR: 0
MOCHA_TIMEOUT: 60000
UNTIL_TIMEOUT: 30000
- task: PublishTestResults@2
inputs:
testResultsFormat: JUnit
testResultsFiles: $(Agent.HomeDirectory)/test-results.xml
testRunTitle: MacOS $(atom_channel)
condition: succeededOrFailed()
- bash: npm run report:coverage
displayName: generate code coverage reports
condition: succeededOrFailed()
- bash: >
bash <(curl -s https://codecov.io/bash)
-n "MacOS $(atom_channel)"
-P "${SYSTEM_PULLREQUEST_PULLREQUESTNUMBER:-}"
-B "${SYSTEM_PULLREQUEST_SOURCEBRANCH:-${BUILD_SOURCEBRANCH}}"
displayName: publish code coverage to CodeCov
env:
CODECOV_TOKEN: $(codecov.token)
condition: succeededOrFailed()
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: cobertura
summaryFileLocation: $(System.DefaultWorkingDirectory)/coverage/cobertura-coverage.xml
reportDirectory: $(System.DefaultworkingDirectory)/coverage/
condition: succeededOrFailed()
- job: Windows
pool:
vmImage: vs2015-win2012r2
variables:
atom_channel: dev
atom_directory: Atom Dev
steps:
- template: script/azure-pipelines/windows-install.yml
parameters:
atom_channel: $(atom_channel)
atom_directory: $(atom_directory)
- powershell: |
Set-StrictMode -Version Latest
$script:ATOMROOT = "$env:AGENT_HOMEDIRECTORY/atom"
$script:ATOM_SCRIPT_PATH = "$script:ATOMROOT\$env:ATOM_DIRECTORY\resources\cli\atom.cmd"
# Normalize %TEMP% as a long (non 8.3) path.
$env:TEMP = (Get-Item -LiteralPath $env:TEMP).FullName
$env:ELECTRON_NO_ATTACH_CONSOLE = "true"
[Environment]::SetEnvironmentVariable("ELECTRON_NO_ATTACH_CONSOLE", "true", "User")
$env:ELECTRON_ENABLE_LOGGING = "YES"
[Environment]::SetEnvironmentVariable("ELECTRON_ENABLE_LOGGING", "YES", "User")
Write-Host "Running tests"
& "$script:ATOM_SCRIPT_PATH" --test test 2>&1 | %{ "$_" }
if ($LASTEXITCODE -ne 0) {
Write-Host "Specs Failed"
$host.SetShouldExit($LASTEXITCODE)
exit
}
displayName: run tests
env:
TEST_JUNIT_XML_PATH: $(Agent.HomeDirectory)/test-results.xml
ATOM_GITHUB_BABEL_ENV: coverage
ATOM_GITHUB_SKIP_SYMLINKS: 1
FORCE_COLOR: 0
MOCHA_TIMEOUT: 60000
UNTIL_TIMEOUT: 30000
- task: PublishTestResults@2
inputs:
testResultsFormat: JUnit
testResultsFiles: $(Agent.HomeDirectory)/test-results.xmlq
testRunTitle: Windows $(atom_channel)
condition: succeededOrFailed()
- powershell: npm run report:coverage
displayName: generate code coverage reports
condition: succeededOrFailed()
- bash: >
bash <(curl -s https://codecov.io/bash)
-n "Windows $(atom_channel)"
-P "${SYSTEM_PULLREQUEST_PULLREQUESTNUMBER:-}"
-B "${SYSTEM_PULLREQUEST_SOURCEBRANCH:-${BUILD_SOURCEBRANCH}}"
displayName: publish code coverage to CodeCov
env:
CODECOV_TOKEN: $(codecov.token)
condition: succeededOrFailed()
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: cobertura
summaryFileLocation: $(System.DefaultWorkingDirectory)/coverage/cobertura-coverage.xml
reportDirectory: $(System.DefaultworkingDirectory)/coverage/
condition: succeededOrFailed()
- job: Lint
pool:
vmImage: ubuntu-16.04
variables:
display: ":99"
atom_channel: dev
steps:
- template: script/azure-pipelines/linux-install.yml
parameters:
atom_channel: $(atom_channel)
atom_name: atom-dev
- bash: /tmp/atom/usr/share/atom-dev/resources/app/apm/node_modules/.bin/npm run lint
displayName: run the linter
- job: Snapshot
pool:
vmImage: ubuntu-16.04
variables:
display: ":99"
atom_channel: dev
steps:
- template: script/azure-pipelines/linux-install.yml
parameters:
atom_channel: $(atom_channel)
atom_name: atom-dev
- bash: /tmp/atom/usr/bin/atom-dev --test test/
displayName: run tests
env:
ATOM_GITHUB_TEST_SUITE: snapshot
TEST_JUNIT_XML_PATH: $(Agent.HomeDirectory)/test-results.xml
FORCE_COLOR: 0
- task: PublishTestResults@2
inputs:
testResultsFormat: JUnit
testResultsFiles: $(Agent.HomeDirectory)/test-results.xml
testRunTitle: Snapshot
condition: succeededOrFailed()