This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 58
88 lines (78 loc) · 3.09 KB
/
build.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
name: build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
channel: [ stable, beta ]
steps:
- uses: actions/checkout@v2
- name: Install Atom and APM (Linux)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
curl -s -L "https://atom.io/download/deb?channel=${{ matrix.channel }}" -o "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
dpkg-deb -x atom-amd64.deb ${HOME}/atom
if [ ${{ matrix.channel }} == "stable" ]; then
APP_DIR="${HOME}/atom/usr/share/atom"
else
APP_DIR="${HOME}/atom/usr/share/atom-${{ matrix.channel }}"
fi
echo DISPLAY=":99" >> $GITHUB_ENV
echo "${APP_DIR}" >> $GITHUB_PATH
echo "${APP_DIR}/resources/app/apm/node_modules/.bin" >> $GITHUB_PATH
echo "./node_modules/.bin" >> $GITHUB_PATH
- name: Install Atom and APM (MacOS)
if: ${{ matrix.os == 'macos-latest' }}
run: |
curl -s -L "https://atom.io/download/mac?channel=${{ matrix.channel }}" -o "atom.zip"
mkdir ${HOME}/.atom && unzip -q atom.zip -d ${HOME}/.atom
if [ ${{ matrix.channel }} == "stable" ]; then
APP_DIR="${HOME}/.atom/Atom.app/Contents/Resources/app"
else
APP_DIR="${HOME}/.atom/Atom ${{ matrix.channel }}.app/Contents/Resources/app"
fi
ln -s "${APP_DIR}/atom.sh" "${APP_DIR}/atom"
echo "${APP_DIR}" >> $GITHUB_PATH
echo "${APP_DIR}/apm/bin" >> $GITHUB_PATH
echo "./node_modules/.bin" >> $GITHUB_PATH
- name: Install Atom and APM (Windows)
if: ${{ matrix.os == 'windows-latest' }}
run: |
Invoke-WebRequest -Uri "https://atom.io/download/windows_zip?channel=${{ matrix.channel }}" -OutFile "atom.zip"
Unzip "atom.zip"
$ATOM_CHANNEL = "Atom"
if ("${{ matrix.channel }}" -ne "stable") {
$ATOM_CHANNEL += " "
$ATOM_CHANNEL += "${{ matrix.channel }}".substring(0, 1).toupper()
$ATOM_CHANNEL += "${{ matrix.channel }}".substring(1).tolower()
}
echo npm_config_msvs_version="2019" >> ${env:GITHUB_ENV}
echo "$ATOM_CHANNEL/resources/cli" >> ${env:GITHUB_PATH}
echo "$ATOM_CHANNEL/resources/app/apm/bin" >> ${env:GITHUB_PATH}
echo "./node_modules/.bin" >> ${env:GITHUB_PATH}
- name: Print Atom and APM versions
run: |
atom -v
apm -v
- name: Install dependencies
run: |
apm install
apm clean
npm install
- name: Test
run: |
atom --test spec
- name: Lint
run: |
coffeelint grammars
coffeelint spec