-
Notifications
You must be signed in to change notification settings - Fork 119
/
Copy path.travis.yml
49 lines (43 loc) · 1.08 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
dist: xenial
language: ruby
sudo: true
cache: bundler
git:
depth: 50
rvm:
- 2.5.3
services:
- postgresql
- redis-server
matrix:
include:
- rvm: 2.5.3
name: 'RuboCop (for changed files)'
if: branch != master
script:
- echo "$(git --no-pager diff --name-only $TRAVIS_COMMIT_RANGE)" | xargs bundle exec rubocop "$@"
- rvm: 2.5.3
name: 'Perform DB setup (with seeds)'
before_script:
- cp config/database.yml.sample config/database.yml
script:
- bundle exec rake db:setup
- rvm: 2.5.3
name: 'Tests'
addons:
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
before_install:
- sudo apt-get update
- sudo apt-get install chromium-chromedriver
before_script:
- export PATH=$PATH:/usr/lib/chromium-browser/
- cp config/database.yml.sample config/database.yml
- cp .env.test .env
- bundle exec rake db:create
- bundle exec rake db:schema:load
script:
- bundle exec rspec