-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
38 lines (32 loc) · 1.25 KB
/
Copy path.travis.yml
File metadata and controls
38 lines (32 loc) · 1.25 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
dist: trusty
sudo: required
language: node_js
env:
global:
- DBUS_SESSION_BUS_ADDRESS=/dev/null
matrix:
fast_finish: true
include:
- node_js: "6"
env: SCRIPT=lint
- node_js: "6"
env: SCRIPT=build
- node_js: "6"
env: SCRIPT=test
# TODO: e2e tests
before_install:
# Use a virtual display.
- if [[ "$SCRIPT" == "test" ]]; then export DISPLAY=:99.0; fi
- if [[ "$SCRIPT" == "test" ]]; then sh -e /etc/init.d/xvfb start; fi
# Install latest chrome.
- if [[ "$SCRIPT" == "test" ]]; then export CHROME_BIN=/usr/bin/google-chrome; fi
- if [[ "$SCRIPT" == "test" ]]; then sudo apt-get update; fi
- if [[ "$SCRIPT" == "test" ]]; then sudo apt-get install -y libappindicator1 fonts-liberation; fi
- if [[ "$SCRIPT" == "test" ]]; then wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb; fi
- if [[ "$SCRIPT" == "test" ]]; then sudo dpkg -i google-chrome*.deb; fi
- if [[ "$SCRIPT" == "test" ]]; then echo "--no-sandbox" > ~/.config/chrome-flags.conf; fi
# Install karma for tests.
- if [[ "$SCRIPT" == "test" ]]; then npm install -g karma; fi
script:
- if [[ "$SCRIPT" == "test" ]]; then karma start karma.conf.js --single-run; fi
- if [[ "$SCRIPT" != "test" ]]; then npm run-script $SCRIPT; fi