forked from rubyforgood/casa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
48 lines (42 loc) · 1.25 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
env:
language: ruby
cache:
bundler: true
yarn: true
directories:
- /home/travis/.rvm/
rvm:
- 2.7.1
services:
- postgresql
addons:
chrome: stable
apt:
- chromium-chromedriver
before_script:
- 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
- psql -c 'create database casa_test;' -U postgres
- psql -c 'create database casa_development;' -U postgres
- ln -s /usr/lib/chromium-browser/chromedriver ~/bin/chromedriver
- nvm use stable
install:
- travis_retry gem install bundler
- travis_retry nvm install node --reinstall-packages-from=node
- travis_retry npm install --global yarn
- travis_retry bundle install
- travis_retry yarn
- bundle install
script:
- bundle exec rails webpacker:compile
- bundle exec brakeman
- bundle exec standardrb
- RUBYOPT='-W:no-deprecated -W:no-experimental' bundle exec rspec
- RAILS_ENV=test bundle exec rails server -b 0.0.0.0 -p 4040 -d
- RAILS_ENV=test bundle exec rake db:migrate
- RAILS_ENV=test bundle exec rake db:seed
- npm run test:cypress
- kill $(jobs -p) || true
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT