-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
Copy path.travis.yml
48 lines (40 loc) · 1.15 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
sudo: required
language: generic
services:
- docker
git:
depth: false
env:
global:
- COMPOSE_FILE=./containers/docker-compose-testing.yml
matrix:
- TASK="rake test:all"
- TASK="rails test:system"
before_install:
- echo -e "repo_token:\n $COVERALLS_REPO_TOKEN" >> ./.coveralls.yml
branches:
only:
- master
- unstable
install:
- cp config/database.yml.example config/database.yml
- cp db/schema.rb.example db/schema.rb
- docker-compose build
- docker-compose up -d
- docker-compose exec web sleep 5
- netstat -ltpn
- docker-compose exec web bash -c "rake db:setup"
- docker-compose exec web bash -c "rake db:migrate"
- docker-compose exec web bash -c "rake assets:precompile"
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then gem install danger danger-junit; fi'
script:
- docker-compose exec web bash -c "CI=TRUE GENERATE_REPORT=true $TASK"
- |
if [ $TASK != "rake test:all" ]; then
echo -e '<?xml version="1.0" encoding="UTF-8"?>' > output.xml;
tail -n +2 -q ./test/reports/TEST*.xml >> output.xml;
fi
- |
if [ $TRAVIS_PULL_REQUEST != "false"; then
danger --verbose;
fi