forked from loomio/loomio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
72 lines (60 loc) · 1.81 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
language: ruby
rvm:
- 2.7.3
dist: bionic
sudo: required
group: edge
cache:
bundler: true
directories:
- vendor/bundle
- vue/node_modules
addons:
chrome: stable
postgresql: "9.6"
artifacts:
paths:
- vue/tests/reports/
- log/
target_paths:
- ${SCREENSHOTS_PATH}
services:
- redis-server
env:
global:
- DB=postgresql
- DISPLAY=:99.0
- PATH=$PATH:$TRAVIS_BUILD_DIR/bin
- RAILS_ENV=test
- PUMA_WORKERS=2
- MIN_THREADS=3
- MAX_THREADS=3
- SCREENSHOTS_PATH=/`date "+%Y-%m-%d_%H-%M"`/${TRAVIS_REPO_SLUG}/
- FEATURES_GROUP_SSO=1
matrix:
- TASK=rspec
- TASK=vue
before_install:
- /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16
- gem install bundler
# - nvm install node && nvm use node
install:
- bundle install --without development --deployment --jobs=3 --retry=3
- cd vue; npm install; cd ..
- git clone https://github.com/loomio/loomio_channel_server.git
- cd loomio_channel_server
- npm install
- npm run start > ../log/channel_server.log &
- cd ..
before_script:
- cp config/database.yml.$DB config/database.yml
- createdb loomio_test
- bundle exec rake db:setup
- if [ "$TASK" = "vue" ]; then bundle exec rails server -b 0.0.0.0 > log/server.log & fi
- cd vue && npm run build && cd ..
- if [ "$TASK" = "vue" ]; then wget http://localhost:3000/; fi
script:
- if [ "$TASK" = "rspec" ]; then bundle exec rspec; fi
- if [ "$TASK" = "vue" ]; then cd vue && npm run test:e2e:standalone && cd .. ; fi
after_script:
- if [ "$TASK" = "vue" ]; then cd ${TRAVIS_BUILD_DIR}/vue/tests/reports && bundle exec ruby rename_screenshots.rb && bundle exec ruby generate_screenshots_index.rb && cd.. ; fi