-
Notifications
You must be signed in to change notification settings - Fork 15
/
.travis.yml
44 lines (41 loc) · 1.19 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
dist: trusty
language: ruby
rvm:
- 2.5.1
addons:
postgresql: "9.6"
chrome: stable
services:
- postgresql
before_install:
- yes | gem update --system --force
- gem install bundler
before_script:
- cp config/application.yml.example config/application.yml
- cp config/database.yml.example config/database.yml
- cp config/tps_config.yml.example config/tps_config.yml
- psql -c 'create database barito_test;' -U postgres
- export DISPLAY=99.0 && sh -e /etc/init.d/xvfb start && sleep 3
script:
- bundle package --all
- bundle install --binstubs --local
- bundle exec rake db:migrate
- bundle exec rake spec
- bundle exec rake assets:precompile
before_deploy:
# Set up git user name and tag this commit
- git config --local user.name "iman"
- git config --local user.email "iman.tung@gmail.com"
- git tag "$(date +'%Y%m%d%H%M%S')-$(git log --format=%h -1)"
- "rm -rf $TRAVIS_BUILD_DIR/*.tar.gz"
- "tar zcf release-$(git log --format=%h -1).tar.gz -C $TRAVIS_BUILD_DIR ./*"
deploy:
provider: releases
skip_cleanup: true
api_key: $GITHUB_TOKEN
file_glob: true
file: $TRAVIS_BUILD_DIR/*.tar.gz
on:
tags: true
repo: BaritoLog/BaritoMarket
all_branches: true