Skip to content

Commit

Permalink
update CircleCI config
Browse files Browse the repository at this point in the history
  • Loading branch information
nabeta committed Aug 12, 2019
1 parent 9f0e41d commit b775c3c
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ jobs:
build:
docker:
# specify the version you desire here
- image: circleci/ruby:2.5-node-browsers
- image: circleci/ruby:2.5-stretch-node-browsers
environment:
PGHOST: 127.0.0.1
PGUSER: postgres

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
- image: circleci/postgres:10
- image: circleci/postgres:11
environment:
POSTGRES_USER: postgres
POSTGRES_DB: enju_question_dummy_test
Expand All @@ -41,10 +41,14 @@ jobs:
paths:
- ./vendor/bundle
key: v1-dependencies-{{ checksum "Gemfile.lock" }}

# Database setup
- run:
command: dockerize -wait tcp://localhost:5432 -timeout 1m
- run:
command: sudo apt install -y openjdk-8-jre-headless
- run:
command: sudo update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
- run: bundle exec rake db:create
- run: bundle exec rake db:schema:load
- run: bundle exec rake app:sunspot:solr:start RAILS_ENV=test
Expand All @@ -55,7 +59,7 @@ jobs:
command: |
mkdir /tmp/test-results
TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)"
bundle exec rspec --format progress \
--format RspecJunitFormatter \
--out /tmp/test-results/rspec.xml \
Expand Down

0 comments on commit b775c3c

Please sign in to comment.