-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
57 lines (49 loc) · 1.45 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
---
language: elixir
elixir:
- '1.7.3'
otp_release:
- '21.0.7'
sudo: false
dist: trusty
addons:
chrome: stable
postgresql: '9.6'
cache:
directories:
- $TRAVIS_BUILD_DIR/backend/deps
- $TRAVIS_BUILD_DIR/backend/_build
- $TRAVIS_BUILD_DIR/client/node_modules
env:
global:
# See https://git.io/vdao3 for details.
- JOBS=1
- MIX_ENV=test
before_install:
- sudo /etc/init.d/postgresql stop
- wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
- sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs 2>/dev/null)-pgdg main" >> /etc/apt/sources.list.d/postgresql.list'
- sudo apt-get update -qq
- sudo apt-get install -qq postgresql-10 postgresql-client-10
- sudo cp /etc/postgresql/9.6/main/pg_hba.conf /etc/postgresql/10/main/pg_hba.conf
- sudo sed -i 's/port = 5433/port = 5432/' /etc/postgresql/10/main/postgresql.conf
- sudo /etc/init.d/postgresql restart
- psql -c "CREATE ROLE travis WITH SUPERUSER LOGIN;" -U postgres
- psql -c "CREATE DATABASE travis OWNER travis;" -U postgres
- nvm install 10.9.0
- npm i -g npm@6.2.0
install:
- cd $TRAVIS_BUILD_DIR/backend
- mix local.hex --force
- mix local.rebar --force
- mix deps.get
- mix ecto.create
- cd $TRAVIS_BUILD_DIR/client
- npm i
script:
- cd $TRAVIS_BUILD_DIR/client
- npm test
- npm run lint:js
- cd $TRAVIS_BUILD_DIR/backend
- mix lint_n_test
- mix coveralls.travis