Skip to content

Commit

Permalink
refs #3 update .circleci/config.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
hamapu committed Sep 30, 2019
1 parent dbe41fc commit 9157437
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions app/.circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ jobs: # a collection of steps
RAILS_ENV: test
- image: circleci/mysql:latest # database image
environment: # environment variables for database
POSTGRES_USER: circleci-demo-ruby
POSTGRES_DB: rails_blog
POSTGRES_PASSWORD: ""
RAILS_ENV: test
DB_HOST: 127.0.0.1
steps: # a collection of executable commands
- checkout # special step to check out source code to working directory

Expand All @@ -33,14 +32,18 @@ jobs: # a collection of steps

- run: # Install Ruby dependencies
name: Bundle Install
command: bundle check --path vendor/bundle || bundle install --deployment
command: bundle check --path vendor/bundle || bundle install --test

# Store bundle cache for Ruby dependencies
- save_cache:
key: rails-demo-bundle-v2-{{ checksum "Gemfile.lock" }}
paths:
- vendor/bundle

- run:
name: Wait for DB
command: dockerize -wait tcp://127.0.0.1:3306 -timeout 120s

- run:
name: Database setup
command: bin/rails db:create || bin/rails db:migrate RAILS_ENV=test || bin/rails db:seed RAILS_ENV=test
Expand Down

0 comments on commit 9157437

Please sign in to comment.