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

Kiskolabs/gha publish to rubygems #6

Closed
wants to merge 12 commits into from
54 changes: 54 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: CI

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true

on:
workflow_call:
push:
branches:
- kiskolabs/add_rails_6.1_and_ruby_3_4

pull_request:
branches:
- kiskolabs/add_rails_6.1_and_ruby_3_4

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
ruby: ['2.6', '2.7', '3.0', '3.4']
gemfile:
- Gemfile
- Gemfile.rails-5.0.x
- Gemfile.rails-5.1.x
- Gemfile.rails-6.0.x
- Gemfile.rails-6.1.x

exclude:
- ruby: 3.0
gemfile: Gemfile.rails-5.0.x
- ruby: 3.4
gemfile: Gemfile.rails-5.0.x
- ruby: 3.0
gemfile: Gemfile.rails-5.1.x
- ruby: 3.4
gemfile: Gemfile.rails-5.1.x

steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler: '2.4'
bundler-cache: true
cache-version: 1 # ignore contents of the cache and get and build all the gems anew.

- name: Run tests
run: |
bundle exec rspec
33 changes: 33 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Deploy to RubyGems

on:
workflow_dispatch:
push:
tags:
- '*'
branches:
- kiskolabs/gha-publish-to-rubygems

jobs:
test:
uses: ./.github/workflows/ci.yml
push:
runs-on: ubuntu-latest
needs: [test]
permissions:
contents: write
id-token: write
steps:
- name: Test
run: |
echo "Testing successful case"

# - uses: actions/checkout@v4
# - name: Set up Ruby
# uses: ruby/setup-ruby@v1
# with:
# bundler-cache: true
# ruby-version: 3.0

# # Release
# - uses: rubygems/release-gem@v1
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ rvm:
- 2.6
- 2.7
- 3.0
- 3.4
gemfile:
- Gemfile
- Gemfile.rails-5.0.x
Expand All @@ -16,11 +17,15 @@ jobs:
exclude:
- rvm: 3.0
gemfile: Gemfile.rails-5.0.x
- rvm: 3.4
gemfile: Gemfile.rails-5.0.x
- rvm: 3.0
gemfile: Gemfile.rails-5.1.x
- rvm: 3.4
gemfile: Gemfile.rails-5.1.x
script: "./bin/rspec spec"
before_install:
- gem install bundler
- gem install bundler -v 2.0
notifications:
email: false
deploy:
Expand Down
15 changes: 11 additions & 4 deletions carpentry.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,18 @@ Gem::Specification.new do |s|

s.files = Dir["{app,lib,config}/**/*"] + ["Rakefile", "Gemfile", "README.md"]

s.add_dependency("railties", ">= 4.2.0", "<= 6.1.4.1")
s.add_dependency("railties", ">= 4.2.0", "~> 6.1.0")

s.add_development_dependency "rdoc"
s.add_development_dependency "rails", ">= 4.2.0", "<= 6.1.4.1"
s.add_development_dependency "capybara", "~> 2.13"
s.add_development_dependency "rails", ">= 4.2.0", "~> 6.1.0"
s.add_development_dependency "concurrent-ruby", "<= 1.3.4"
s.add_development_dependency "capybara", ">= 2.13"
s.add_development_dependency "autotest-standalone"
s.add_development_dependency "rspec-rails", "~> 3.4"
s.add_development_dependency "rspec-rails"

if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.4')
s.add_development_dependency "bigdecimal"
s.add_development_dependency "mutex_m"
s.add_development_dependency "drb"
end
end
2 changes: 1 addition & 1 deletion lib/carpentry/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Carpentry
VERSION = "2.2.5"
VERSION = "2.2.6"
end
2 changes: 1 addition & 1 deletion spec/dummy/config/boot.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Set up gems listed in the Gemfile.
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)

require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
$LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__)
Loading