This repository has been archived by the owner on Sep 2, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
92 lines (78 loc) · 2.03 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
language: ruby
sudo: false
notifications:
email: false
cache:
bundler: true
addons:
postgresql: "9.6"
bundler_args: --without test --jobs 3 --retry 3
before_script:
- psql -c "CREATE DATABASE artccmgr_test;" -U postgres
- cp config/database.yml.travis config/database.yml
- bundle exec rake db:schema:load db:seed
env:
global:
- "RAILS_ENV=test"
rvm:
- 2.3
- 2.4
- ruby-head
allow_failures:
- rvm: ruby-head
jobs:
include:
- stage: Lint
rvm: 2.3.3
env:
- "RUBOCOP=true"
before_script: /bin/true
script:
- bundle exec rubocop
- stage: Coverage & security
rvm: 2.3.3
env:
- "COVERAGE=true"
- stage: Coverage & security
rvm: 2.3.3
env:
- "BRAKEMAN=true"
before_script: /bin/true
script:
- bundle exec brakeman -A
- stage: Code climate
rvm: 2.3.3
env:
- "COVERAGE=true"
skip_cleanup: true
before_script:
- psql -c "CREATE DATABASE artccmgr_test;" -U postgres
- cp config/database.yml.travis config/database.yml
- bundle exec rake db:schema:load db:seed
- 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
script:
- bundle exec rspec
after_script:
- ./cc-test-reporter after-build --debug --exit-code $TRAVIS_TEST_RESULT
if: branch = development AND (NOT type = pull_request)
- stage: Staging
rvm: 2.3.3
before_script: /bin/true
script: /bin/true
deploy: &heroku
provider: heroku
app: artccmgr-dev
api_key: $HEROKU_API_KEY
on: development
if: branch = development AND (NOT type = pull_request)
- stage: Deploy
rvm: 2.3.3
before_script: /bin/true
script: /bin/true
deploy:
<<: *heroku
app: artccmgr
on: master
if: branch = master AND (NOT type = pull_request)