Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 5db1eed

Browse files
authored
Merge pull request #2214 from atom/aw/ci-tinkering
Simplify CI
2 parents d83706c + 3aa7f7e commit 5db1eed

File tree

1 file changed

+29
-36
lines changed

1 file changed

+29
-36
lines changed

azure-pipelines.yml

Lines changed: 29 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1+
trigger:
2+
branches:
3+
include:
4+
- master
5+
- '*-releases'
6+
pr:
7+
branches:
8+
include:
9+
- '*'
10+
111
jobs:
212
- job: Linux
313
pool:
414
vmImage: ubuntu-16.04
5-
strategy:
6-
matrix:
7-
dev:
8-
atom_channel: dev
9-
atom_name: atom-dev
10-
beta:
11-
atom_channel: beta
12-
atom_name: atom-beta
13-
stable:
14-
atom_channel: stable
15-
atom_name: atom
1615
variables:
1716
display: ":99"
17+
atom_channel: dev
18+
atom_name: atom-dev
1819
steps:
1920
- template: script/azure-pipelines/linux-install.yml
2021
parameters:
@@ -38,10 +39,14 @@ jobs:
3839
- bash: npm run report:coverage
3940
displayName: generate code coverage reports
4041
condition: succeededOrFailed()
41-
- bash: npm run codecov -- --build="Linux $(atom_channel)"
42+
- bash: |
43+
env
44+
bash <(curl -s https://codecov.io/bash) -n "Linux $(atom_channel)" -P "${VCS_PULL_REQUEST}" -B "${VCS_BRANCH_NAME}"
4245
displayName: publish code coverage to CodeCov
4346
env:
4447
CODECOV_TOKEN: $(codecov.token)
48+
VCS_BRANCH_NAME: $[coalesce(variables.System.PullRequest.SourceBranch, variables.Build.SourceBranch)]
49+
VCS_PULL_REQUEST: $(System.PullRequest.PullRequestNumber)
4550
condition: succeededOrFailed()
4651
- task: PublishCodeCoverageResults@1
4752
inputs:
@@ -53,17 +58,9 @@ jobs:
5358
- job: MacOS
5459
pool:
5560
vmImage: macos-10.13
56-
strategy:
57-
matrix:
58-
dev:
59-
atom_channel: dev
60-
atom_app: Atom Dev.app
61-
beta:
62-
atom_channel: beta
63-
atom_app: Atom Beta.app
64-
stable:
65-
atom_channel: stable
66-
atom_app: Atom.app
61+
variables:
62+
atom_channel: dev
63+
atom_app: Atom Dev.app
6764
steps:
6865
- template: script/azure-pipelines/macos-install.yml
6966
parameters:
@@ -87,10 +84,12 @@ jobs:
8784
- bash: npm run report:coverage
8885
displayName: generate code coverage reports
8986
condition: succeededOrFailed()
90-
- bash: npm run codecov -- --build="MacOS $(atom_channel)"
87+
- bash: bash <(curl -s https://codecov.io/bash) -n "MacOS $(atom_channel)" -P "${VCS_PULL_REQUEST}" -B "${VCS_BRANCH_NAME}"
9188
displayName: publish code coverage to CodeCov
9289
env:
9390
CODECOV_TOKEN: $(codecov.token)
91+
VCS_BRANCH_NAME: $[coalesce(variables.System.PullRequest.SourceBranch, variables.Build.SourceBranch)]
92+
VCS_PULL_REQUEST: $(System.PullRequest.PullRequestNumber)
9493
condition: succeededOrFailed()
9594
- task: PublishCodeCoverageResults@1
9695
inputs:
@@ -102,17 +101,9 @@ jobs:
102101
- job: Windows
103102
pool:
104103
vmImage: vs2015-win2012r2
105-
strategy:
106-
matrix:
107-
dev:
108-
atom_channel: dev
109-
atom_directory: Atom Dev
110-
beta:
111-
atom_channel: beta
112-
atom_directory: Atom Beta
113-
stable:
114-
atom_channel: stable
115-
atom_directory: Atom
104+
variables:
105+
atom_channel: dev
106+
atom_directory: Atom Dev
116107
steps:
117108
- template: script/azure-pipelines/windows-install.yml
118109
parameters:
@@ -156,10 +147,12 @@ jobs:
156147
- powershell: npm run report:coverage
157148
displayName: generate code coverage reports
158149
condition: succeededOrFailed()
159-
- powershell: npm run codecov -- --build="Windows $(atom_channel)"
150+
- bash: bash <(curl -s https://codecov.io/bash) -n "Windows $(atom_channel)" -P "${VCS_PULL_REQUEST}" -B "${VCS_BRANCH_NAME}"
160151
displayName: publish code coverage to CodeCov
161152
env:
162153
CODECOV_TOKEN: $(codecov.token)
154+
VCS_BRANCH_NAME: $[coalesce(variables.System.PullRequest.SourceBranch, variables.Build.SourceBranch)]
155+
VCS_PULL_REQUEST: $(System.PullRequest.PullRequestNumber)
163156
condition: succeededOrFailed()
164157
- task: PublishCodeCoverageResults@1
165158
inputs:

0 commit comments

Comments
 (0)