.travis.yml
env:
global:
CC_TEST_REPORTER_ID: c45fcc839a26cf4207ee1407607588daae2bee3e0a119976ac9830b05d682f74
RAILS_ENV: test
CI: enabled
language: ruby
rvm:
- 2.5
- 2.6
addons:
postgresql: 9.6
services:
- docker
cache:
directories:
- "$PWD/vendor/.bundle/"
before_install:
- 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"
install:
- bundle check --path vendor/.bundle/ || bundle install --path vendor/.bundle/
- bundle exec rails db:create
- bundle exec rails db:schema:load || bundle exec rails db:migrate
jobs:
include:
- stage: test
- name: Model Tests
script: bundle exec rails test:models
- name: Controller Tests
script: bundle exec rails test:controllers
- name: Rubocop Linter
script: bundle exec rubocop
- name: Docker Build
script: docker build -t dontfile .
- stage: deploy
script: skip
deploy: &heroku
on:
tags: true
all_branches: true
repo: dontfile/dontfile
provider: heroku
app: dont-file
api_key:
secure: wXCfybAthfHNBSabChtNqMhmC/SD/HocWKWe1KWhcQVkZbuuw+wAPsVqsZPEYYF9+9rKh1FH00qFjQBpa95rotwGHSo38wo4vKMlXcE/sCVkMbpjJ0tQOWK3yursZ5dIcIfYKEedWyOc3VuteY9CxfLV9uxAHvxisB6YvBewsWBNCRm/umFxN4czREIjqtpb9lvGgek5rw/TVpZuBLM/j/pPwUR6YRMU/GN1AZQLPf/9uhpcQB5cwWfKBRxDAvPTMtKZ0ceCNY8BqbVl5VWq7fpd981IgsjwnYvxsy9kVlTYvx13t5HKqLZ23JDc+64zdoochM08LMaGUDonYFjcFYSlGD3WMsWowINDt9E9oFK8atXYlreFZ15bLxbzIjEYL8BOMsJlwsd0eZmMQAUbq8vAIYxqD4ODjspcxgxswLOYL3WQBxQi16+it9gReC8x75wj7RB81XVnrNB+xixksrWxy20NG7rAHwRmfHia57MOw2rLbh7D6c1SoutZIp64WAkU7wP5Hc91q3l4YSDDwN+U4hRg7LIlXDZsLRF+M+3P6yTEiIM5pVnNc0GtP0VNZ+H2g+8y1hp15bm4yJWPOMv/vaTV2M776tL9mEgqYIWWRvUVyt6nIL93PEMGPXxJLLV/jQ7OSeyvuOl5E7BEbsdJOiElNX9cLji8GlO2H38=
after_script:
- "./cc-test-reporter after-build -t simplecov --exit-code $TRAVIS_TEST_RESULT"