forked from publiclab/plots2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
39 lines (33 loc) · 1.67 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
sudo: required
services:
- docker
git:
depth: false
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 bash -c "rake assets:precompile"
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then gem install danger danger-junit; fi'
script:
- docker-compose exec web bash -c "wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb"
- docker-compose exec web bash -c "dpkg -i google-chrome-stable_current_amd64.deb; apt-get -fy install"
- docker-compose exec web bash -c "wget https://chromedriver.storage.googleapis.com/73.0.3683.68/chromedriver_linux64.zip" # https://sites.google.com/a/chromium.org/chromedriver/
- docker-compose exec web bash -c "unzip chromedriver_linux64.zip"
- docker-compose exec web bash -c "mv chromedriver /usr/local/bin/chromedriver"
- docker-compose exec web bash -c "chmod +x /usr/local/bin/chromedriver"
- 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:system test"
- 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'