This repository was archived by the owner on Dec 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 408
172 lines (169 loc) · 5.49 KB
/
ci.yml
File metadata and controls
172 lines (169 loc) · 5.49 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
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
name: ci
on:
push:
branches:
- master
pull_request:
types:
- opened
- reopened
- synchronize
jobs:
linux-tests:
name: linux tests
runs-on: ubuntu-18.04
env:
DISPLAY: ":99"
ATOM_GITHUB_BABEL_ENV: coverage
ATOM_CHANNEL: nightly
ATOM: /tmp/atom/usr/bin/atom-nightly
APM: /tmp/atom/usr/share/atom-nightly/resources/app/apm/bin/apm
MOCHA_TIMEOUT: 60000
UNTIL_TIMEOUT: 30000
steps:
- uses: actions/checkout@v1
- name: install Atom
shell: bash
run: |
curl -s -L https://atom.io/download/deb?channel=${ATOM_CHANNEL} \
-H 'Accept: application/octet-stream' \
-o /tmp/atom-amd64.deb
/sbin/start-stop-daemon --start --quiet \
--pidfile /tmp/custom_xvfb_99.pid \
--make-pidfile --background \
--exec /usr/bin/Xvfb \
-- :99 -ac -screen 0 1280x1024x16
sudo apt-get update
sudo apt-get install -yyq libgconf-2-4 build-essential git libsecret-1-dev gvfs-bin
dpkg-deb -x /tmp/atom-amd64.deb /tmp/atom
- name: install dependencies
shell: bash
run: ${APM} ci
- name: configure git
shell: bash
run: |
git config --global user.name Hubot
git config --global user.email hubot@github.com
- name: run tests
shell: bash
run: ${ATOM} --test test/
- name: report code coverage
shell: bash
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
SYSTEM_PULLREQUEST_PULLREQUESTNUMBER: ${{ github.event.number }}
SYSTEM_PULLREQUEST_SOURCEBRANCH: ${{ github.head_ref }}
BUILD_SOURCEBRANCH: ${{ github.event.ref }}
run: |
npm run report:coverage
bash <(curl -s https://codecov.io/bash) \
-n "Linux" \
-P "${SYSTEM_PULLREQUEST_PULLREQUESTNUMBER:-}" \
-B "${SYSTEM_PULLREQUEST_SOURCEBRANCH:-${BUILD_SOURCEBRANCH}}"
if: success() || failure()
macos-tests:
name: macos tests
runs-on: macos-10.14
env:
ATOM_GITHUB_BABEL_ENV: coverage
ATOM_CHANNEL: nightly
ATOM: /tmp/atom/Atom\ Nightly.app/Contents/Resources/app/atom.sh
APM: /tmp/atom/Atom\ Nightly.app/Contents/Resources/app/apm/bin/apm
MOCHA_TIMEOUT: 60000
UNTIL_TIMEOUT: 30000
steps:
- uses: actions/checkout@v1
- name: install Atom
shell: bash
run: |
curl -s -L https://atom.io/download/mac?channel=${ATOM_CHANNEL} \
-H 'Accept: application/octet-stream' \
-o /tmp/atom.zip
sudo unzip -q /tmp/atom.zip -d /tmp/atom
- name: install dependencies
shell: bash
run: sh -c "${APM} ci"
- name: configure git
shell: bash
run: |
git config --global user.name Hubot
git config --global user.email hubot@github.com
- name: run tests
shell: bash
run: sh -c "${ATOM} --test test/"
- name: report code coverage
shell: bash
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
SYSTEM_PULLREQUEST_PULLREQUESTNUMBER: ${{ github.event.number }}
SYSTEM_PULLREQUEST_SOURCEBRANCH: ${{ github.head_ref }}
BUILD_SOURCEBRANCH: ${{ github.event.ref }}
run: |
npm run report:coverage
bash <(curl -s https://codecov.io/bash) \
-n "macOS" \
-P "${SYSTEM_PULLREQUEST_PULLREQUESTNUMBER:-}" \
-B "${SYSTEM_PULLREQUEST_SOURCEBRANCH:-${BUILD_SOURCEBRANCH}}"
if: success() || failure()
lint:
name: lint
runs-on: ubuntu-18.04
env:
DISPLAY: ":99"
ATOM_CHANNEL: nightly
ATOM: /tmp/atom/usr/bin/atom-nightly
APM: /tmp/atom/usr/share/atom-nightly/resources/app/apm/bin/apm
steps:
- uses: actions/checkout@v1
- name: install Atom
shell: bash
run: |
curl -s -L https://atom.io/download/deb?channel=${ATOM_CHANNEL} \
-H 'Accept: application/octet-stream' \
-o /tmp/atom-amd64.deb
/sbin/start-stop-daemon --start --quiet \
--pidfile /tmp/custom_xvfb_99.pid \
--make-pidfile --background \
--exec /usr/bin/Xvfb \
-- :99 -ac -screen 0 1280x1024x16
sudo apt-get update
sudo apt-get install -yyq libgconf-2-4 build-essential git libsecret-1-dev gvfs-bin
dpkg-deb -x /tmp/atom-amd64.deb /tmp/atom
- name: install dependencies
shell: bash
run: ${APM} ci
- name: lint
shell: bash
run: npm run lint
snapshot-tests:
name: snapshot tests
runs-on: ubuntu-18.04
env:
DISPLAY: ":99"
ATOM_CHANNEL: nightly
ATOM: /tmp/atom/usr/bin/atom-nightly
APM: /tmp/atom/usr/share/atom-nightly/resources/app/apm/bin/apm
ATOM_GITHUB_BABEL_ENV: coverage
ATOM_GITHUB_TEST_SUITE: snapshot
steps:
- uses: actions/checkout@v1
- name: install Atom
shell: bash
run: |
curl -s -L https://atom.io/download/deb?channel=${ATOM_CHANNEL} \
-H 'Accept: application/octet-stream' \
-o /tmp/atom-amd64.deb
/sbin/start-stop-daemon --start --quiet \
--pidfile /tmp/custom_xvfb_99.pid \
--make-pidfile --background \
--exec /usr/bin/Xvfb \
-- :99 -ac -screen 0 1280x1024x16
sudo apt-get update
sudo apt-get install -yyq libgconf-2-4 build-essential git libsecret-1-dev gvfs-bin
dpkg-deb -x /tmp/atom-amd64.deb /tmp/atom
- name: install dependencies
shell: bash
run: ${APM} ci
- name: run snapshot tests
shell: bash
run: ${ATOM} --test test/