Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CircleCI #14

Merged
merged 4 commits into from Sep 26, 2019
Merged

CircleCI #14

Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

💚 Add circleci config file

  • Loading branch information
unhappychoice committed Sep 26, 2019
commit 473585a7c948bf041446c051353f47358eab5f18
@@ -0,0 +1,69 @@

version: 2.1

update_bundler: &update_bundler
run:
name: update bundler
command: gem update bundler

bundle_install: &bundle_install
run:
name: bundle install
command: bundle install --path vendor/bundle --jobs 4

restore_bundle_cache: &restore_bundle_cache
restore_cache:
key: cache-bundler-{{ checksum "Gemfile.lock" }}

wait_redis_service: &wait_redis_service
run:
name: wait for redis
command: dockerize -wait tcp://127.0.0.1:6379 -timeout 1m

jobs:
build:
docker:
- image: circleci/ruby
steps:
- checkout
- *restore_bundle_cache
- *update_bundler
- *bundle_install
- save_cache:
key: cache-bundler-{{ checksum "Gemfile.lock" }}
paths:
- vendor/bundle
rubocop:
docker:
- image: circleci/ruby
steps:
- checkout
- *restore_bundle_cache
- *update_bundler
- *bundle_install
- run: bundle exec rubocop
rspec:
docker:
- image: circleci/ruby
- image: redis
steps:
- checkout
- *restore_bundle_cache
- *update_bundler
- *bundle_install
- *wait_redis_service
- run:
environment:
RAILS_ENV: test
COVERAGE: true
CODECOV_TOKEN: 0fdf6f58-374b-4082-bada-d3407b6eaf81
command: bundle exec rspec
workflows:
version: 2.1
rspec:
jobs:
- build
- rubocop:
requires: [build]
- rspec:
requires: [build]
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.