Skip to content

Commit

Permalink
Merge pull request #65 from tknzk/modified_circleci_config
Browse files Browse the repository at this point in the history
test on ruby 2.6, 2.7
  • Loading branch information
tknzk authored Jan 8, 2020
2 parents 431bd20 + 0b7a43d commit 6491911
Showing 1 changed file with 51 additions and 5 deletions.
56 changes: 51 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,70 @@
version: 2.1

jobs:
ruby:
executors:
working_directory: /root/kirico
ruby_2_7:
docker:
- image: rubylang/ruby:2.7.0-bionic
ruby_2_6:
docker:
- image: rubylang/ruby:2.6.5-bionic
ruby_2_5:
docker:
- image: rubylang/ruby:2.5.7-bionic

commands:
install_system_dependencies:
description: "Install system dependencies"
steps:
- run:
name: Install System Dependencies
# https://circleci.com/docs/2.0/custom-images/#required-tools-for-primary-containers
command: apt-get update -y && apt-get install -y ssh
- checkout

bundle_gems:
description: "Bundle gems"
steps:
- run:
name: install and execute
name: Bundle gems
command: |
gem install bundler -v 1.17.3 --no-document --force
bundle install
run_tests:
description: "Run tests"
steps:
- run:
name: Run tests
command: |
bundle exec rake
bundle exec rubocop
jobs:
run_tests_on_ruby_2_7:
executor: ruby_2_7
steps:
- install_system_dependencies
- checkout
- bundle_gems
- run_tests
run_tests_on_ruby_2_6:
executor: ruby_2_6
steps:
- install_system_dependencies
- checkout
- bundle_gems
- run_tests
run_tests_on_ruby_2_5:
executor: ruby_2_5
steps:
- install_system_dependencies
- checkout
- bundle_gems
- run_tests

workflows:
version: 2
test:
jobs:
- ruby
- run_tests_on_ruby_2_7
- run_tests_on_ruby_2_6
- run_tests_on_ruby_2_5

0 comments on commit 6491911

Please sign in to comment.