forked from codeRIT/hackathon-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
51 lines (49 loc) · 1.42 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
sudo: false
# "test" step configuration
language: ruby
services:
- mysql
rvm:
- 2.6
- 2.5
cache:
bundler: true
bundler_args: --path vendor --local --without development
addons:
code_climate:
repo_token: a42e116d4d68894b025a60cb722a0b9ba2cf1c6497debb02993d0702284d2511
before_install:
# Ensure an up-to-date bundler version is used, otherwise fails on Ruby 2.5
- bundle update --bundler
before_script:
- mysql -u root -e "CREATE DATABASE myapp_test;"
- mysql -u root -e "GRANT ALL PRIVILEGES ON myapp_test.* TO 'travis'@'%';";
- mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql
- export DATABASE_URL="mysql2://travis@localhost/myapp_test"
script:
- bin/rails db:migrate
- RUN_COVERAGE=travis bin/rails test
- bin/rails coverage:report
# "deploy" step configuration
jobs:
include:
- stage: deploy
name: Build & publish new release (if needed)
if: type = push AND branch = master AND repo = "codeRIT/hackathon-manager"
language: node_js
node_js: lts/*
cache:
yarn: true
before_install: skip
before_script: skip
script: yarn semantic-release
- stage: deploy
name: Push docs website update
if: type = push AND branch = master AND repo = "codeRIT/hackathon-manager"
language: node_js
node_js: lts/*
cache:
yarn: true
before_install: skip
before_script: skip
script: bash website/travis-deploy.sh