unhappychoice/bitflyer-cli

View on GitHub
.circleci/config.yml

Summary

Maintainability
Test Coverage
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" }}

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
  rspec:
    docker:
      - image: circleci/ruby
    steps:
      - checkout
      - *restore_bundle_cache
      - *update_bundler
      - *bundle_install
      - run:
          environment:
            RAILS_ENV: test
          command: bundle exec rspec
workflows:
  version: 2.1
  rspec:
    jobs:
      - build
      - rspec:
          requires: [build]