-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
86 lines (75 loc) · 2.38 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
language: elixir
elixir: 1.10
otp_release: 23.0
dist: xenial
notifications:
email:
on_success: never
on_failure: never
addons:
postgresql: "9.6"
# chrome: stable
# apt:
# sources:
# - google-chrome
# packages:
# - google-chrome-stable
services:
- xvfb
cache:
directories:
- _build
- deps
env:
global:
- MIX_ENV=test
# matrix:
# include:
# - elixir: 1.7
# otp_release: 20.0
# allow_failures:
# - elixir: 1.6
# otp_release: 20.0
before_install:
# Manually Install Headless Chrome
- curl -sSL "https://travis-build.whitewater.ibm.com/files/gpg/google-chrome.asc" | sudo -E apt-key add -
- echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee -a ${TRAVIS_ROOT}/etc/apt/sources.list >/dev/null
- travis_apt_get_update
- sudo -E apt-get -yq --no-install-suggests --no-install-recommends $(travis_apt_get_options) install google-chrome-stable --allow-unauthenticated
# Configure Packages - CouchDB
- sudo apt install -y curl apt-transport-https gnupg
- curl https://couchdb.apache.org/repo/keys.asc | gpg --dearmor | sudo tee /usr/share/keyrings/couchdb-archive-keyring.gpg >/dev/null 2>&1
- echo "deb [signed-by=/usr/share/keyrings/couchdb-archive-keyring.gpg] https://apache.jfrog.io/artifactory/couchdb-deb/ bionic main" | sudo tee /etc/apt/sources.list.d/couchdb.list >/dev/null
- sudo rm -rf /etc/couchdb
# Install Packages
- sudo apt-get update
- sudo apt-get install couchdb=2.3.1~xenial
- sudo apt-get install chromium-chromedriver
# Start Packages
- sudo systemctl start couchdb
- sudo systemctl enable couchdb
- sudo systemctl status couchdb
- google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost &
# Setup Application
- cp .env.travis .env
- set -a
- source .env
- set +a
# Install Dependencies
- mix local.rebar --force
- mix local.hex --force
before_script:
- mix do ecto.create, ecto.migrate
- export PATH=$PATH:/usr/lib/chromium-browser/
- sleep 3 # give server some time to bind to sockets, etc
- nohup chromedriver &
- sleep 3 # give server some time bring up chromedriver environment
- bin/local/reset-tests
env:
matrix:
# TODO: temporarily disabled until browser test setup is fixed
# - TEST="--include browser"
- TEST=""
- TEST="formatter"
script:
- bin/ci/test "${TEST}"