forked from electerm/electerm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
63 lines (57 loc) · 1.53 KB
/
.travis.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
matrix:
include:
- os: osx
osx_image: xcode11.5
language: node_js
node_js: "12"
env:
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
- os: linux
language: node_js
node_js: "12"
sudo: required
dist: bionic
services:
- xvfb
deploy:
provider: snap
channel: edge
skip_cleanup: true
addons:
apt:
packages:
- rpm
cache:
yarn: true
directories:
- node_modules
- $HOME/.cache/electron
- $HOME/.cache/electron-builder
before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start &
- sleep 3 # give xvfb some time to start
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo snap refresh && sudo snap install snapcraft --classic &&echo $SNAP_TOKEN | snapcraft login --with - ; fi
before_install:
- if echo "$TRAVIS_COMMIT_MESSAGE" | grep -F -q "[skip travis]" ; then echo "[skip travis] has been found, exiting" && exit 0 ; else echo "[skip travis] has not been found, continuing" ; fi
- npm install -g yarn
script:
- npm run pre-test
- |
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
echo "skip test for linux"
else
npm run test
fi
- |
if echo "$TRAVIS_COMMIT_MESSAGE" | grep -F -q "[skip build]" ; then
echo "[skip build] has been found, exiting" && exit 0 ;
elif [ "$TRAVIS_OS_NAME" == "linux" ]; then
npm run build-linux
else
npm run output -m
fi
branches:
- release
- test