forked from openHPI/codeocean
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
43 lines (35 loc) · 1.44 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
sudo: required
services:
- docker
addons:
code_climate:
repo_token: 53a2c2608c848714e96f6a1fc0365dcfdfec051f7827d50cea965ea625f49734
postgresql: "9.5"
before_install:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
# Config to run docker tests - doesn't work so far
# - sudo apt-get update
# - sudo apt-get upgrade lxc-docker
# - echo 'DOCKER_OPTS="-H tcp://127.0.0.1:4243 -H unix:///var/run/docker.sock --iptables=false"' | sudo tee /etc/default/docker > /dev/null
# - export DOCKER_HOST=tcp://192.168.23.75:2375
# - sudo service docker restart
# - sleep 5
# - docker pull openhpi/docker_ruby
before_script:
- cp .rspec.travis .rspec
- cp config/action_mailer.yml.travis config/action_mailer.yml
- cp config/code_ocean.yml.travis config/code_ocean.yml
- cp config/database.yml.travis config/database.yml
- cp config/secrets.yml.travis config/secrets.yml
- psql --command='CREATE DATABASE travis_ci_test;' --username=postgres
- bundle exec rake db:schema:load RAILS_ENV=test
cache: bundler
language: ruby
rvm:
- 2.3.1
# - 2.1.5
# - 2.2.1
script: bundle exec rspec --color --format documentation --require spec_helper --require rails_helper --tag ~docker
# one of the solutions I've found
# - sudo docker run --rm=true -v `pwd`:/ansible-apache:rw weldpua2008/docker-ansible:${OS_TYPE}${OS_VERSION}_v${ANSIBLE_VERSION} /bin/bash -c "/ansible-apache/tests/test-in-docker-image.sh ${OS_TYPE} ${OS_VERSION} ${ANSIBLE_VERSION}"