Skip to content

Commit 0f70dd6

Browse files
committed
Revert "Merge pull request atom#2459 from UziTech/setup-atom"
This reverts commit 6ab7dd6, reversing changes made to 6951c7b.
1 parent 60f3918 commit 0f70dd6

File tree

1 file changed

+118
-43
lines changed

1 file changed

+118
-43
lines changed

.github/workflows/ci.yml

Lines changed: 118 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,97 +1,172 @@
11
name: ci
22
on:
3-
pull_request:
43
push:
54
branches:
65
- master
6+
pull_request:
7+
types:
8+
- opened
9+
- reopened
10+
- synchronize
711
jobs:
8-
tests:
9-
name: tests
10-
strategy:
11-
matrix:
12-
os: [ubuntu-18.04, macos-latest, windows-latest]
13-
channel: [beta, nightly]
14-
fail-fast: false
15-
runs-on: ${{ matrix.os }}
12+
linux-tests:
13+
name: linux tests
14+
runs-on: ubuntu-18.04
1615
env:
16+
DISPLAY: ":99"
1717
ATOM_GITHUB_BABEL_ENV: coverage
18+
ATOM_CHANNEL: nightly
19+
ATOM: /tmp/atom/usr/bin/atom-nightly
20+
APM: /tmp/atom/usr/share/atom-nightly/resources/app/apm/bin/apm
1821
MOCHA_TIMEOUT: 60000
1922
UNTIL_TIMEOUT: 30000
2023
steps:
2124
- uses: actions/checkout@v1
2225
- name: install Atom
23-
uses: UziTech/action-setup-atom@v1
24-
with:
25-
channel: ${{ matrix.channel }}
26-
27-
- name: install windows build tools
28-
if: contains(matrix.os, 'windows')
26+
shell: bash
2927
run: |
30-
choco install visualcpp-build-tools --version=14.0.25420.1 --ignore-dependencies -y --params "'/IncludeRequired'"
31-
echo "VCTargetsPath='C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\v140'" >> $GITHUB_ENV
28+
curl -s -L https://atom.io/download/deb?channel=${ATOM_CHANNEL} \
29+
-H 'Accept: application/octet-stream' \
30+
-o /tmp/atom-amd64.deb
31+
/sbin/start-stop-daemon --start --quiet \
32+
--pidfile /tmp/custom_xvfb_99.pid \
33+
--make-pidfile --background \
34+
--exec /usr/bin/Xvfb \
35+
-- :99 -ac -screen 0 1280x1024x16
36+
sudo apt-get update
37+
sudo apt-get install -yyq libgconf-2-4 build-essential git libsecret-1-dev gvfs-bin
38+
dpkg-deb -x /tmp/atom-amd64.deb /tmp/atom
3239
- name: install dependencies
33-
run: apm ci
34-
40+
shell: bash
41+
run: ${APM} ci
3542
- name: configure git
3643
shell: bash
3744
run: |
3845
git config --global user.name Hubot
3946
git config --global user.email [email protected]
47+
- name: run tests
48+
shell: bash
49+
run: ${ATOM} --test test/
50+
- name: report code coverage
51+
shell: bash
52+
env:
53+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
54+
SYSTEM_PULLREQUEST_PULLREQUESTNUMBER: ${{ github.event.number }}
55+
SYSTEM_PULLREQUEST_SOURCEBRANCH: ${{ github.head_ref }}
56+
BUILD_SOURCEBRANCH: ${{ github.event.ref }}
57+
run: |
58+
npm run report:coverage
59+
bash <(curl -s https://codecov.io/bash) \
60+
-n "Linux" \
61+
-P "${SYSTEM_PULLREQUEST_PULLREQUESTNUMBER:-}" \
62+
-B "${SYSTEM_PULLREQUEST_SOURCEBRANCH:-${BUILD_SOURCEBRANCH}}"
63+
if: success() || failure()
4064

41-
- name: Run the tests
42-
if: ${{ !contains(matrix.os, 'windows') }}
43-
run: atom --test test
44-
45-
- name: Run the tests on Windows
46-
if: ${{ contains(matrix.os, 'windows') }}
47-
continue-on-error: true # due to https://github.com/atom/github/pull/2459#issuecomment-624725972
48-
run: atom --test test
49-
65+
macos-tests:
66+
name: macos tests
67+
runs-on: macos-10.14
68+
env:
69+
ATOM_GITHUB_BABEL_ENV: coverage
70+
ATOM_CHANNEL: nightly
71+
ATOM: /tmp/atom/Atom\ Nightly.app/Contents/Resources/app/atom.sh
72+
APM: /tmp/atom/Atom\ Nightly.app/Contents/Resources/app/apm/bin/apm
73+
MOCHA_TIMEOUT: 60000
74+
UNTIL_TIMEOUT: 30000
75+
steps:
76+
- uses: actions/checkout@v1
77+
- name: install Atom
78+
shell: bash
79+
run: |
80+
curl -s -L https://atom.io/download/mac?channel=${ATOM_CHANNEL} \
81+
-H 'Accept: application/octet-stream' \
82+
-o /tmp/atom.zip
83+
sudo unzip -q /tmp/atom.zip -d /tmp/atom
84+
- name: install dependencies
85+
shell: bash
86+
run: sh -c "${APM} ci"
87+
- name: configure git
88+
shell: bash
89+
run: |
90+
git config --global user.name Hubot
91+
git config --global user.email [email protected]
92+
- name: run tests
93+
shell: bash
94+
run: sh -c "${ATOM} --test test/"
5095
- name: report code coverage
5196
shell: bash
5297
env:
5398
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
5499
SYSTEM_PULLREQUEST_PULLREQUESTNUMBER: ${{ github.event.number }}
55100
SYSTEM_PULLREQUEST_SOURCEBRANCH: ${{ github.head_ref }}
56101
BUILD_SOURCEBRANCH: ${{ github.event.ref }}
57-
OS_NAME: ${{ matrix.os }}
58102
run: |
59103
npm run report:coverage
60-
COVERAGE_NAME=$([[ "${OS_NAME}" == macos* ]] && echo "macOS" || echo "Linux")
61104
bash <(curl -s https://codecov.io/bash) \
62-
-n "${COVERAGE_NAME}" \
105+
-n "macOS" \
63106
-P "${SYSTEM_PULLREQUEST_PULLREQUESTNUMBER:-}" \
64107
-B "${SYSTEM_PULLREQUEST_SOURCEBRANCH:-${BUILD_SOURCEBRANCH}}"
65-
if: |
66-
!contains(matrix.os, 'windows') &&
67-
(success() || failure())
108+
if: success() || failure()
109+
68110
lint:
69111
name: lint
70112
runs-on: ubuntu-18.04
113+
env:
114+
DISPLAY: ":99"
115+
ATOM_CHANNEL: nightly
116+
ATOM: /tmp/atom/usr/bin/atom-nightly
117+
APM: /tmp/atom/usr/share/atom-nightly/resources/app/apm/bin/apm
71118
steps:
72119
- uses: actions/checkout@v1
73120
- name: install Atom
74-
uses: UziTech/action-setup-atom@v1
75-
with:
76-
channel: nightly
121+
shell: bash
122+
run: |
123+
curl -s -L https://atom.io/download/deb?channel=${ATOM_CHANNEL} \
124+
-H 'Accept: application/octet-stream' \
125+
-o /tmp/atom-amd64.deb
126+
/sbin/start-stop-daemon --start --quiet \
127+
--pidfile /tmp/custom_xvfb_99.pid \
128+
--make-pidfile --background \
129+
--exec /usr/bin/Xvfb \
130+
-- :99 -ac -screen 0 1280x1024x16
131+
sudo apt-get update
132+
sudo apt-get install -yyq libgconf-2-4 build-essential git libsecret-1-dev gvfs-bin
133+
dpkg-deb -x /tmp/atom-amd64.deb /tmp/atom
77134
- name: install dependencies
78-
run: apm ci
135+
shell: bash
136+
run: ${APM} ci
79137
- name: lint
138+
shell: bash
80139
run: npm run lint
81140

82141
snapshot-tests:
83142
name: snapshot tests
84143
runs-on: ubuntu-18.04
85144
env:
145+
DISPLAY: ":99"
146+
ATOM_CHANNEL: nightly
147+
ATOM: /tmp/atom/usr/bin/atom-nightly
148+
APM: /tmp/atom/usr/share/atom-nightly/resources/app/apm/bin/apm
86149
ATOM_GITHUB_BABEL_ENV: coverage
87150
ATOM_GITHUB_TEST_SUITE: snapshot
88151
steps:
89152
- uses: actions/checkout@v1
90153
- name: install Atom
91-
uses: UziTech/action-setup-atom@v1
92-
with:
93-
channel: nightly
154+
shell: bash
155+
run: |
156+
curl -s -L https://atom.io/download/deb?channel=${ATOM_CHANNEL} \
157+
-H 'Accept: application/octet-stream' \
158+
-o /tmp/atom-amd64.deb
159+
/sbin/start-stop-daemon --start --quiet \
160+
--pidfile /tmp/custom_xvfb_99.pid \
161+
--make-pidfile --background \
162+
--exec /usr/bin/Xvfb \
163+
-- :99 -ac -screen 0 1280x1024x16
164+
sudo apt-get update
165+
sudo apt-get install -yyq libgconf-2-4 build-essential git libsecret-1-dev gvfs-bin
166+
dpkg-deb -x /tmp/atom-amd64.deb /tmp/atom
94167
- name: install dependencies
95-
run: apm ci
168+
shell: bash
169+
run: ${APM} ci
96170
- name: run snapshot tests
97-
run: atom --test test/
171+
shell: bash
172+
run: ${ATOM} --test test/

0 commit comments

Comments
 (0)