-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy path.travis.yml
53 lines (42 loc) · 1.48 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
dist: trusty
sudo: required
language: ruby
cache:
- bundler
- yarn
env:
- RAILS_ENV=test
RAKE_ENV=test
DISPLAY=:0.0
BOT_USERNAME=kite-bot
BOT_NAME="Kite Bot"
BOT_EMAIL=kite-bot@heliostech.fr
DOCKERHUB_USER=peatioexchange
services:
- mysql
- docker
# Execute all of the commands which need to be executed before installing dependencies.
before_install:
- gem install bundler
- . $HOME/.nvm/nvm.sh
- nvm install 8
- nvm use 8
- npm i -g yarn
- docker pull $DOCKERHUB_USER/applogic:latest || true
- docker login -u $DOCKERHUB_USER -p $DOCKERHUB_PASSWORD || true # Don't let the build fail in case of broken authentication in Docker Hub.
- ./bin/init_config
# Execute all of the commands which should install application dependencies.
install:
- bundle install --deployment --without production development --jobs=$(nproc) --retry=3
# Execute all of the commands which need to be executed before running actual tests.
before_script:
- bundle exec rake yarn:install db:create db:migrate
# Execute all of the commands which should make the build pass or fail.
script:
- bundle exec rspec
# - bundle exec rubocop
- docker build --tag $DOCKERHUB_USER/applogic:latest --cache-from $DOCKERHUB_USER/applogic:latest .
# Execute all of the commands which need to be executed after the build passed.
after_success: docker push $DOCKERHUB_USER/applogic:latest || true
# Execute all of the commands which need to be executed after the build failed.
after_failure: