forked from BindaCMS/binda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
34 lines (34 loc) · 1.15 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
language: ruby
env:
global:
- CODECLIMATE_REPO_TOKEN=7bffb1da50f35979ea3ef4fc205aa03c6b3c10fa603d5b66f19f81ab06d2ab97
- CC_TEST_REPORTER_ID=7bffb1da50f35979ea3ef4fc205aa03c6b3c10fa603d5b66f19f81ab06d2ab97
rvm:
- 2.3.4
addons:
firefox: "58.0"
postgresql: "9.6"
services:
- postgresql
before_script:
# Setup codeclimate test coverage reporter
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
# setup database
- cp config/database.yml.travis spec/dummy/config/database.yml
- psql -c 'create database travis_ci_test;' -U postgres
# install Geckodriver
- wget https://github.com/mozilla/geckodriver/releases/download/v0.19.1/geckodriver-v0.19.1-linux64.tar.gz
- mkdir geckodriver
- tar -xzf geckodriver-v0.19.1-linux64.tar.gz -C geckodriver
- export PATH=$PATH:$PWD/geckodriver
# run Firefox
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3
script:
- bin/rails db:migrate RAILS_ENV=test
- bundle exec rspec
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT