forked from HaveAGitGat/HBBatchBeast
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
65 lines (44 loc) · 1.78 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
64
osx_image: xcode8.4 # define OS X image which will be mounted
dist: trusty # use Ubuntu Trusty for Linux operation system
# Note: if you switch to sudo: false, you'll need to launch chrome with --no-sandbox.
# See https://github.com/travis-ci/travis-ci/issues/8836
sudo: required
# Define Node.js as the programming language as we have a web application
language: node_js
node_js: '8'
addons:
chrome: stable # Install chrome stable on operating systems
# A list of operating systems which are used for tests
os:
- linux
- osx
- windows
env:
global:
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
- YARN_GPG=no
cache:
yarn: true
directories:
- $HOME/.cache/electron
- $HOME/.cache/electron-builder
- $HOME/.npm/_prebuilds
before_cache:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then rm -rf $HOME/.cache/electron-builder/wine; fi
# These commands are executed before the scripts are executed
install:
- cd HBBatchBeast
# On OS X we first need to install Yarn via Homebrew
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install yarn; fi
# Install all dependencies listed in your package.json file
- yarn
script:
- echo "Unit Tests"
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then npm run package-win; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install fakeroot; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then npm install electron-installer-debian --save; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then npm run package-linux; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then npm run create-debian-installer; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then npm run package-mac; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then npm run create-installer-mac; fi