add parallel tests for circleci

This commit is contained in:
Albert Yi
2018-05-11 12:42:00 -07:00
parent a430b062ab
commit f56f059545

View File

@@ -11,6 +11,7 @@ defaults: &defaults
jobs: jobs:
build: build:
<<: *defaults <<: *defaults
parallelism: 5
steps: steps:
- checkout - checkout
- setup_remote_docker - setup_remote_docker
@@ -42,7 +43,8 @@ jobs:
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' 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: - run:
name: Run tests name: Run tests
command: docker-compose -f config/docker/compose.yml exec web bin/rails t command: |
docker-compose -f config/docker/compose.yml exec web bash -c 'circleci tests glob "test/**/*_test.rb" | circleci tests split | xargs bin/rails test'
- store_test_results: - store_test_results:
path: test/reports path: test/reports
- run: - run: