Skip to content

Commit

Permalink
bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
nabeta committed Apr 28, 2019
1 parent 6fc7a55 commit 65a592a
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 25 deletions.
81 changes: 58 additions & 23 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,69 @@
# Ruby CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-ruby/ for more details
#
version: 2
jobs:
build:
working_directory: ~/enju_search_log
docker:
- image: circleci/ruby:2.4
environment:
BUNDLE_JOBS: 3
BUNDLE_PATH: vendor/bundle
PGHOST: 127.0.0.1
PGUSER: postgres
- image: circleci/postgres:9.6-alpine
environment:
POSTGRES_USER: postgres
POSTGRES_DB: enju_search_log_dummy_test
# specify the version you desire here
- image: circleci/ruby:2.5-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
environment:
POSTGRES_USER: postgres
POSTGRES_DB: enju_search_log_dummy_test

working_directory: ~/repo

steps:
- checkout

# Download and cache dependencies
- restore_cache:
keys:
- rails-demo-bundle-v2-{{ checksum "Gemfile.lock" }}
- rails-demo-bundle-v2-
- run: bundle update
- v1-dependencies-{{ checksum "Gemfile.lock" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- run:
command: dockerize -wait tcp://localhost:5432 -timeout 1m
- run:
command: sudo apt install -y openjdk-8-jre-headless
- run: bundle exec rake db:create RAILS_ENV=test
- run: bundle exec rake db:migrate RAILS_ENV=test
- run: bundle exec rake app:sunspot:solr:start RAILS_ENV=test
- run: bundle exec rake
name: install dependencies
command: |
bundle install --jobs=4 --retry=3 --path vendor/bundle
- save_cache:
key: rails-demo-bundle-v2-{{ checksum "Gemfile.lock" }}
paths:
- vendor/bundle
- ./vendor/bundle
key: v1-dependencies-{{ checksum "Gemfile.lock" }}

# Database setup
- run:
command: dockerize -wait tcp://localhost:5432 -timeout 1m
- run: bundle exec rake db:create
- run: bundle exec rake db:schema:load

# run tests!
- run:
name: run tests
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 \
--format progress \
$TEST_FILES
# collect reports
- store_test_results:
path: /tmp/test-results
- store_artifacts:
path: /tmp/test-results
destination: test-results
5 changes: 4 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@ gem 'jquery-rails'

# To use debugger
# gem 'debugger'
gem 'rails-controller-testing'
group :test do
gem 'rails-controller-testing'
gem 'rspec_junit_formatter'
end
2 changes: 1 addition & 1 deletion lib/enju_search_log/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module EnjuSearchLog
VERSION = "0.3.0"
VERSION = "0.3.1"
end

0 comments on commit 65a592a

Please sign in to comment.