Merge branch 'circleci-fixes'

This commit is contained in:
Albert Yi
2018-05-15 10:25:06 -07:00
11 changed files with 168 additions and 86 deletions

View File

@@ -43,15 +43,13 @@ jobs:
docker-compose -f config/docker/compose.yml exec archives dockerize -wait tcp://$PGHOST:$PGPORT bash -l -c 'cd /app ; bundle exec rake db:create ; bundle exec rake db:migrate'
docker-compose -f config/docker/compose.yml exec web dockerize -wait tcp://$PGHOST:$PGPORT bash -l -c 'cd /app ; bin/rake db:create ; bin/rake db:migrate'
- run:
name: Test splitting
name: Run tests
command: |
ping -c 5 public-api.secure.pixiv.net
ping -c 5 oauth.secure.pixiv.net
ping -c 5 www.pixiv.net
circleci tests glob test/**/*_test.rb | circleci tests split | xargs -I{} docker-compose -f config/docker/compose.yml exec -T web bash -l -c 'cd /app ; bin/rails test {}'
circleci tests glob test/**/*_test.rb | circleci tests split | xargs -I{} docker-compose -f config/docker/compose.yml exec -T web bash -l -c 'cd /app ; bin/rails test --no-ci-clean {}'
docker cp docker_web_1:/app/test/reports /tmp
- store_test_results:
path: /tmp/reports
- run:
name: Teardown
command: docker-compose -f config/docker/compose.yml down
# - run:
# name: Teardown
# command: docker-compose -f config/docker/compose.yml down