forked from Coursemology/coursemology2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
68 lines (64 loc) · 2.01 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
dist: trusty
sudo: true
language: ruby
branches:
except:
- /^bundle-update-[0-9]{4}-[0-9]{2}-[0-9]{2}-[0-9]{6}+$/
rvm:
- 2.4.1
services:
- docker
addons:
chrome: stable
apt:
packages:
- ghostscript
postgresql: "9.4"
hosts:
- coursemology.lvh.me
bundler_args: "--jobs=3 --retry=3 --without development:production --deployment"
cache:
bundler: true
yarn: true
directories:
- $HOME/.cache/yarn
- $(npm root -g)
- $(npm prefix -g)/bin
env:
global:
- RAILS_ENV=test
matrix:
- GROUP="1,2"
- GROUP="3,4"
- GROUP="5,6"
- GROUP="7,8"
- GROUP="misc"
before_install:
- nvm install 6
- node --version
- npm list -g yarn --depth=0 || npm install -g yarn
- yarn --version
- docker --version
- gem update bundler
- cd client && yarn install --production && cd -
before_script:
- psql -c 'create database coursemology_test;' -U postgres
- psql -c 'create database coursemology_test2;' -U postgres
- cd client && yarn build:production && cd -
- bundle exec rake parallel:setup[2]
script:
- 'if [ "$GROUP" = "misc" ]; then bundle exec consistency_fail; fi'
- 'if [ "$GROUP" = "misc" ]; then bundle exec i18n-tasks unused; fi'
- 'if [ "$GROUP" = "misc" ]; then bundle exec i18n-tasks missing; fi'
- 'if [ "$GROUP" = "misc" ]; then bundle exec rake factory_girl:lint; fi'
- 'if [ "$GROUP" = "misc" ]; then bundle exec rake assets:precompile; fi'
- 'if [ "$GROUP" = "misc" ]; then cd client && yarn; fi'
- 'if [ "$GROUP" = "misc" ]; then yarn lint; fi'
- 'if [ "$GROUP" = "misc" ]; then yarn test; fi'
- 'if [ "$GROUP" = "misc" ]; then cd ..; fi'
- 'if [ "$GROUP" != "misc" ]; then export CODECOV_FLAG=backend; fi'
- 'if [ "$GROUP" != "misc" ]; then bundle exec parallel_rspec spec -n 8 --only-group $GROUP --runtime-log spec/fixtures/parallel_runtime_rspec.log; fi'
after_script:
- 'if [ "$GROUP" = "misc" ]; then bash <(curl -s https://codecov.io/bash) -F frontend -s client/coverage; fi'
notifications:
slack: coursemology:kdSjdF4xtXGOBIvMsbIF4gQ6