forked from publiclab/plots2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
31 lines (25 loc) · 1.08 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
sudo: required
services:
- docker
env:
- COMPOSE_FILE=./containers/docker-compose-testing.yml
before_install:
- echo -e "repo_token:\n $COVERALLS_REPO_TOKEN" >> ./.coveralls.yml
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
- docker-compose logs db
- netstat -ltpn
- docker-compose exec web bash -c "rake db:setup"
- docker-compose exec web bash -c "rake db:migrate"
- docker-compose exec web yarn --ignore-engines --ignore-scripts --modules-folder ./public/lib && yarn postinstall
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then gem install danger danger-junit; fi'
script:
- docker-compose exec web bash -c "CI=TRUE GENERATE_REPORT=true rake test:all"
- docker-compose exec web bash -c "CI=TRUE GENERATE_REPORT=true rails test -d"
- echo -e '<?xml version="1.0" encoding="UTF-8"?>' > output.xml
- tail -n +2 -q ./test/reports/TEST*.xml >> output.xml
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then danger --verbose; fi'