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

Deprecate ruby 2.5 #99

Merged
merged 1 commit into from
Aug 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 36 additions & 16 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,61 @@
---
version: 2.1

tag-trigger: &tag-trigger
tags:
only: /^v.*/

commands:
setup-bundler:
steps:
- run:
name: setup bundler
command: |
sudo gem update --system
sudo gem uninstall bundler
sudo rm /usr/local/bin/bundle || true
sudo rm /usr/local/bin/bundler || true
sudo gem install bundler --version 2.2.21
bundle config set path 'vendor/bundle'

install_dependencies:
steps:
- restore_cache:
keys:
- v1-dependencies-{{ checksum "Gemfile" }}
- v2-dependencies-{{ checksum "Gemfile" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies
- v2-dependencies

- run:
name: Install dependencies
command: |
bundle install --jobs=3 --retry=3 --path vendor/bundle
bundle install --jobs=3 --retry=3

- save_cache:
key: v1-dependencies-{{ checksum "Gemfile" }}
key: v2-dependencies-{{ checksum "Gemfile" }}
paths:
- ./vendor/bundle

unittests:
steps:
- setup-bundler
- install_dependencies
- run:
name: Run unittests
command: |
bundle exec rake
jobs:
ruby-255-unittest:
ruby-262-unittest:
docker:
- image: circleci/ruby:2.5.5
- image: circleci/ruby:2.6.2
working_directory: ~/repo
steps:
- checkout
- unittests

ruby-262-unittest:
ruby-270-unittest:
docker:
- image: circleci/ruby:2.6.2
- image: circleci/ruby:2.7.0
working_directory: ~/repo
steps:
- checkout
Expand All @@ -62,20 +80,22 @@ workflows:
version: 2
tests:
jobs:
- ruby-255-unittest:
context: autotestaccount
- ruby-262-unittest:
filters:
<<: *tag-trigger
context: autotestaccount
- ruby-270-unittest:
filters:
<<: *tag-trigger
context: autotestaccount
- push-rubygems:
requires:
- ruby-255-unittest
- ruby-262-unittest
- ruby-270-unittest
filters:
tags:
only: /^v.*/
<<: *tag-trigger
branches:
ignore: /.*/

nightly:
triggers:
- schedule:
Expand All @@ -85,7 +105,7 @@ workflows:
only:
- main
jobs:
- ruby-255-unittest:
context: autotestaccount
- ruby-262-unittest:
context: autotestaccount
- ruby-270-unittest:
context: autotestaccount
1 change: 1 addition & 0 deletions 3scale-api.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Gem::Specification.new do |spec|
spec.bindir = 'exe'
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ['lib']
spec.required_ruby_version = '>= 2.6'

spec.add_development_dependency 'bundler'
spec.add_development_dependency 'rake', '~> 13.0'
Expand Down