-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
executable file
·37 lines (36 loc) · 1004 Bytes
/
.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
language: ruby
branches:
only:
- dev
- master
cache:
bundler: true
npm: true
sudo: required
services:
- docker
before_install:
# https://bundler.io/blog/2019/05/14/solutions-for-cant-find-gem-bundler-with-executable-bundle.html
- gem install bundler -v "$(grep -A 1 "BUNDLED WITH" Gemfile.lock | tail -n 1)"
#install heroku CLI for deployment
before_script:
- export HOME="/home/travis"
- curl https://toolbelt.heroku.com/install.sh | sudo sh
# need node to compile assets
- nvm install 13.1.0
- nvm alias default 13.1.0
- nvm use 13.1.0
script:
# this has to be run before compiling the assets, else rufus fails
- RAILS_ENV=test bundle exec rails db:migrate
# else views with TypeScript components will not render
- RAILS_ENV=test bundle exec rails assets:precompile
- bundle exec rspec spec/
- bundle exec rubocop
deploy:
provider: script
skip_cleanup: true
script: ./deployment.sh
on:
all_branches: true
condition: $TRAVIS_BRANCH =~ ^(dev|master)$