2018-10-14 06:05:18 -04:00
|
|
|
version: 2
|
|
|
|
references:
|
|
|
|
repo_restore_cache: &repo_restore_cache
|
|
|
|
restore_cache:
|
|
|
|
keys:
|
|
|
|
- repo-{{ .Environment.CIRCLE_SHA1 }}
|
|
|
|
|
|
|
|
repo_save_cache: &repo_save_cache
|
|
|
|
save_cache:
|
|
|
|
key: repo-{{ .Environment.CIRCLE_SHA1 }}-{{ epoch }}
|
|
|
|
paths:
|
|
|
|
- ~/pry
|
|
|
|
|
|
|
|
bundle_install: &bundle_install
|
|
|
|
run:
|
|
|
|
name: Install Bundler dependencies
|
|
|
|
command: bundle install --path ~/pry/vendor/bundle --jobs 15
|
|
|
|
|
|
|
|
unit: &unit
|
|
|
|
run:
|
|
|
|
name: Run unit tests
|
|
|
|
command: bundle exec rake
|
|
|
|
|
|
|
|
install_alpine_nano: &install_alpine_nano
|
|
|
|
run:
|
|
|
|
name: Install Nano text editor on Alpine Linux
|
|
|
|
command: apk add nano
|
|
|
|
|
|
|
|
install_ubuntu_nano: &install_ubuntu_nano
|
|
|
|
run:
|
|
|
|
name: Install Nano text editor on Ubuntu
|
|
|
|
command: sudo apt-get install nano
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
rubocop_lint:
|
|
|
|
docker:
|
|
|
|
- image: circleci/ruby:2.5
|
|
|
|
working_directory: ~/pry
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- <<: *repo_save_cache
|
|
|
|
- <<: *bundle_install
|
|
|
|
- run:
|
|
|
|
name: Run RuboCop linting
|
|
|
|
command: bundle exec rubocop --parallel
|
|
|
|
yard_lint:
|
|
|
|
docker:
|
|
|
|
- image: circleci/ruby:2.5
|
|
|
|
working_directory: ~/pry
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- <<: *repo_save_cache
|
|
|
|
- <<: *bundle_install
|
|
|
|
- run:
|
|
|
|
name: Run YARD linting
|
|
|
|
command: bundle exec yardoc --fail-on-warning --no-progress
|
|
|
|
"ruby-1.9":
|
|
|
|
docker:
|
|
|
|
- image: kyrylo/ruby-1.9.3p551
|
|
|
|
working_directory: /home/circleci/pry
|
|
|
|
steps:
|
|
|
|
- <<: *repo_restore_cache
|
|
|
|
- <<: *bundle_install
|
2018-10-14 10:00:07 -04:00
|
|
|
- <<: *install_alpine_nano
|
2018-10-14 06:05:18 -04:00
|
|
|
- <<: *unit
|
|
|
|
"ruby-2.0":
|
|
|
|
docker:
|
|
|
|
- image: kyrylo/ruby-2.0.0p648
|
|
|
|
working_directory: /home/circleci/pry
|
|
|
|
steps:
|
|
|
|
- <<: *repo_restore_cache
|
|
|
|
- <<: *bundle_install
|
2018-10-14 10:00:07 -04:00
|
|
|
- <<: *install_alpine_nano
|
2018-10-14 06:05:18 -04:00
|
|
|
- <<: *unit
|
|
|
|
"ruby-2.1":
|
|
|
|
docker:
|
|
|
|
- image: circleci/ruby:2.1
|
|
|
|
working_directory: ~/pry
|
|
|
|
steps:
|
|
|
|
- <<: *repo_restore_cache
|
|
|
|
- <<: *bundle_install
|
2018-10-14 10:00:07 -04:00
|
|
|
- <<: *install_ubuntu_nano
|
2018-10-14 06:05:18 -04:00
|
|
|
- <<: *unit
|
|
|
|
"ruby-2.2":
|
|
|
|
docker:
|
|
|
|
- image: circleci/ruby:2.2
|
|
|
|
working_directory: ~/pry
|
|
|
|
steps:
|
|
|
|
- <<: *repo_restore_cache
|
|
|
|
- <<: *bundle_install
|
2018-10-14 10:00:07 -04:00
|
|
|
- <<: *install_ubuntu_nano
|
2018-10-14 06:05:18 -04:00
|
|
|
- <<: *unit
|
|
|
|
"ruby-2.3":
|
|
|
|
docker:
|
|
|
|
- image: circleci/ruby:2.3
|
|
|
|
working_directory: ~/pry
|
|
|
|
steps:
|
|
|
|
- <<: *repo_restore_cache
|
|
|
|
- <<: *bundle_install
|
2018-10-14 10:00:07 -04:00
|
|
|
- <<: *install_ubuntu_nano
|
2018-10-14 06:05:18 -04:00
|
|
|
- <<: *unit
|
|
|
|
"ruby-2.4":
|
|
|
|
docker:
|
|
|
|
- image: circleci/ruby:2.4
|
|
|
|
working_directory: ~/pry
|
|
|
|
steps:
|
|
|
|
- <<: *repo_restore_cache
|
|
|
|
- <<: *bundle_install
|
2018-10-14 10:00:07 -04:00
|
|
|
- <<: *install_ubuntu_nano
|
2018-10-14 06:05:18 -04:00
|
|
|
- <<: *unit
|
|
|
|
"ruby-2.5":
|
|
|
|
docker:
|
|
|
|
- image: circleci/ruby:2.5
|
|
|
|
working_directory: ~/pry
|
|
|
|
steps:
|
|
|
|
- <<: *repo_restore_cache
|
|
|
|
- <<: *bundle_install
|
2018-10-14 10:00:07 -04:00
|
|
|
- <<: *install_ubuntu_nano
|
2018-10-14 06:05:18 -04:00
|
|
|
- <<: *unit
|
|
|
|
"jruby-9.1-jdk":
|
|
|
|
docker:
|
|
|
|
- image: circleci/jruby:9.1-jdk
|
|
|
|
working_directory: ~/pry
|
|
|
|
steps:
|
|
|
|
- <<: *repo_restore_cache
|
|
|
|
- <<: *bundle_install
|
2018-10-14 10:00:07 -04:00
|
|
|
- <<: *install_ubuntu_nano
|
2018-10-14 06:05:18 -04:00
|
|
|
- <<: *unit
|
|
|
|
|
|
|
|
workflows:
|
|
|
|
version: 2
|
|
|
|
build:
|
|
|
|
jobs:
|
|
|
|
- rubocop_lint
|
|
|
|
- yard_lint
|
|
|
|
- "ruby-1.9":
|
|
|
|
requires:
|
|
|
|
- rubocop_lint
|
|
|
|
- yard_lint
|
|
|
|
- "ruby-2.0":
|
|
|
|
requires:
|
|
|
|
- rubocop_lint
|
|
|
|
- yard_lint
|
|
|
|
- "ruby-2.1":
|
|
|
|
requires:
|
|
|
|
- rubocop_lint
|
|
|
|
- yard_lint
|
|
|
|
- "ruby-2.2":
|
|
|
|
requires:
|
|
|
|
- rubocop_lint
|
|
|
|
- yard_lint
|
|
|
|
- "ruby-2.3":
|
|
|
|
requires:
|
|
|
|
- rubocop_lint
|
|
|
|
- yard_lint
|
|
|
|
- "ruby-2.4":
|
|
|
|
requires:
|
|
|
|
- rubocop_lint
|
|
|
|
- yard_lint
|
|
|
|
- "ruby-2.5":
|
|
|
|
requires:
|
|
|
|
- rubocop_lint
|
|
|
|
- yard_lint
|
|
|
|
- "jruby-9.1-jdk":
|
|
|
|
requires:
|
|
|
|
- rubocop_lint
|
|
|
|
- yard_lint
|