Skip to content

Commit

Permalink
chore: test ruby 2.2-2.5 and rails 4.0-6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
TamarinEA committed Aug 6, 2021
1 parent cbdec53 commit 9d06ecf
Show file tree
Hide file tree
Showing 7 changed files with 127 additions and 36 deletions.
99 changes: 83 additions & 16 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,86 @@
build:
test:
image: abakpress/dind-testing
pull: true
privileged: true
volumes:
- /home/data/drone/images:/images
- /home/data/drone/gems:/bundle
name: build

kind: pipeline
type: docker

volumes:
- name: rubygems
host:
path: /home/data/drone/rubygems
- name: images
host:
path: /home/data/drone/images
- name: bundle
host:
path: /home/data/drone/gems
- name: keys
host:
path: /home/data/drone/key_cache

spec_step_common: &spec_step_common
image: abakpress/dind-testing:1.0.3
pull: if-not-exists
privileged: true
volumes:
- name: images
path: /images
- name: bundle
path: /bundle
- name: keys
path: /ssh_keys
commands:
- prepare-build

- fetch-images
--image whilp/ssh-agent
--image abakpress/ruby-app:$RUBY_IMAGE_TAG

- dip ssh add -T -v /ssh_keys -k /ssh_keys/id_rsa
- dip provision
- dip rspec

steps:
- name: Tests Ruby 2.2
environment:
- COMPOSE_FILE_EXT=drone
- RUBY_IMAGE_TAG=2.2-latest
commands:
- wrapdocker docker -v
COMPOSE_FILE_EXT: drone
DOCKER_RUBY_VERSION: 2.2
RUBY_IMAGE_TAG: 2.2-latest
RAILS_ENV: test
<<: *spec_step_common

- fetch-images
--image abakpress/ruby-app:$RUBY_IMAGE_TAG
- name: Tests Ruby 2.3
environment:
COMPOSE_FILE_EXT: drone
DOCKER_RUBY_VERSION: 2.3
RUBY_IMAGE_TAG: 2.3-latest
RAILS_ENV: test
<<: *spec_step_common

- name: Tests Ruby 2.4
environment:
COMPOSE_FILE_EXT: drone
DOCKER_RUBY_VERSION: 2.4
RUBY_IMAGE_TAG: 2.4-latest
RAILS_ENV: test
<<: *spec_step_common

- dip provision
- dip rspec
- name: Tests Ruby 2.5
environment:
COMPOSE_FILE_EXT: drone
DOCKER_RUBY_VERSION: 2.5
RUBY_IMAGE_TAG: 2.5-latest
RAILS_ENV: test
<<: *spec_step_common

- name: release
image: abakpress/gem-publication:latest
pull: if-not-exists
when:
event: push
branch: master
status: success
volumes:
- name: rubygems
path: /root/.gem
commands:
- release-gem --public
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
/tmp/
/gemfiles/*
/spec/internal/test
/.idea/
43 changes: 33 additions & 10 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,20 +1,43 @@
appraise 'rails3.1' do
gem 'rails', '~> 3.1'
if RUBY_VERSION < '2.4'
appraise 'rails4.0' do
gem 'activesupport', '~> 4.0.0'
gem 'sqlite3', '~> 1.3.6'
end

appraise 'rails4.1' do
gem 'activesupport', '~> 4.1.0'
gem 'sqlite3', '~> 1.3.6'
end
end

appraise 'rails3.2' do
gem 'rails', '~> 3.2'
appraise 'rails4.2' do
gem 'activesupport', '~> 4.2.0'
gem 'sqlite3', '~> 1.3.6'
end

appraise 'rails4.0' do
gem 'rails', '~> 4.0'
appraise 'rails5.0' do
gem 'activesupport', '~> 5.0.0'
gem 'sqlite3', '~> 1.3.6'
end

appraise 'rails4.1' do
gem 'rails', '~> 4.1'
appraise 'rails5.1' do
gem 'activesupport', '~> 5.1.0'
gem 'sqlite3', '~> 1.3.6'
end

appraise 'rails4.2' do
gem 'rails', '~> 4.2'
appraise 'rails5.2' do
gem 'activesupport', '~> 5.2.0'
gem 'sqlite3', '~> 1.3.6'
end

if RUBY_VERSION >= '2.5'
appraise 'rails6.0' do
gem 'activesupport', '~> 6.0.0'
gem 'sqlite3', '~> 1.4'
end

appraise 'rails6.1' do
gem 'activesupport', '~> 6.1.0'
gem 'sqlite3', '~> 1.4'
end
end
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
source 'https://rubygems.org'
gem 'mime-types', '< 3.0' if RUBY_VERSION < '2'

gemspec
4 changes: 2 additions & 2 deletions dip.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version: '1'

environment:
DOCKER_RUBY_VERSION: 2.2
RUBY_IMAGE_TAG: 2.2-latest
DOCKER_RUBY_VERSION: 2.5
RUBY_IMAGE_TAG: 2.5-latest
COMPOSE_FILE_EXT: development
RAILS_ENV: test

Expand Down
10 changes: 4 additions & 6 deletions findit.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,15 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]

spec.add_runtime_dependency 'activesupport', '>= 3.1'
spec.add_runtime_dependency 'activesupport', '>= 4.0'

spec.add_development_dependency "rake", "~> 10.0"
spec.add_development_dependency 'activerecord'
spec.add_development_dependency 'will_paginate'
spec.add_development_dependency "rspec", ">= 3.2"
spec.add_development_dependency "rspec-rails", ">= 3.2"
spec.add_development_dependency "rspec-rails", ">= 3.9.1"
spec.add_development_dependency 'combustion', '>= 0.5'
spec.add_development_dependency "appraisal", ">= 2.1.0"
spec.add_development_dependency 'pry'
spec.add_development_dependency 'shoulda-matchers', '< 3.0.0'
spec.add_development_dependency 'pry-byebug'
spec.add_development_dependency 'simplecov'
spec.add_development_dependency 'sqlite3'
spec.add_development_dependency 'test-unit'
end
5 changes: 4 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@

require 'combustion'
require 'will_paginate'
require 'pry-byebug'

Combustion.initialize! :all do
require 'active_record'

Combustion.initialize! :active_record do
config.cache_store = :memory_store
end

Expand Down

0 comments on commit 9d06ecf

Please sign in to comment.