add CircleCI config file. (#3)

* add CircleCI config file.

* bump rb-fsevent.

* file YML syntax error.

* fix CircleCI config.
This commit is contained in:
Justin Licata 2017-07-14 14:09:56 -05:00 committed by GitHub
parent 4597a7f7db
commit 82674fdf73
3 changed files with 64 additions and 1 deletions

59
.circleci/config.yml Normal file

@ -0,0 +1,59 @@
# Ruby CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-ruby/ for more details
version: 2
jobs:
build:
docker:
# specify the version you desire here
- image: circleci/ruby:2.4.1-node-browsers
environment:
PGHOST: 127.0.0.1
PGUSER: storm
RAILS_ENV: test
- image: circleci/postgres:9.4
environment:
POSTGRES_USER: storm
POSTGRES_DB: storm_test
POSTGRES_PASSWORD: ""
working_directory: ~/storm
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "Gemfile.lock" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run:
name: install dependencies
command: |
bundle install --jobs=4 --retry=3 --path vendor/bundle
- save_cache:
paths:
- ./venv
key: v1-dependencies-{{ checksum "Gemfile.lock" }}
# Database setup
- run: bundle exec rails db:create
- run: bundle exec rails db:schema:load
# run tests!
- run:
name: run tests
command: |
mkdir /tmp/test-results
bundle exec rails test
# collect reports
- store_test_results:
path: /tmp/test-results
- store_artifacts:
path: /tmp/test-results
destination: test-results

@ -20,6 +20,7 @@ gem 'uglifier', '>= 1.3.0'
group :test do
gem 'minitest-rails-capybara'
gem 'minitest-ci'
end
group :development, :test do

@ -100,6 +100,8 @@ GEM
capybara (~> 2.2)
minitest (~> 5.0)
rake
minitest-ci (3.2.0)
minitest (>= 5.0.6)
minitest-metadata (0.6.0)
minitest (>= 4.7, < 6.0)
minitest-rails (3.0.0)
@ -144,7 +146,7 @@ GEM
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (12.0.0)
rb-fsevent (0.10.1)
rb-fsevent (0.10.2)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
responders (2.4.0)
@ -209,6 +211,7 @@ DEPENDENCIES
factory_girl_rails (~> 4.8)
foreman
listen (>= 3.0.5, < 3.2)
minitest-ci
minitest-rails-capybara
pg (~> 0.18)
puma (~> 3.7)