Skip to content

Commit

Permalink
Merge pull request #9 from kickstarter/github-actions-fixes
Browse files Browse the repository at this point in the history
github actions fixes
  • Loading branch information
amancevice authored Sep 7, 2023
2 parents 3998d6c + 2626bbc commit aaf45aa
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 25 deletions.
6 changes: 0 additions & 6 deletions .github/actions/setup-rubygems/action.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
name: Setup RubyGems
description: Setup RubyGems credentials
inputs:
ruby-version:
description: Ruby version
required: true
rubygems_api_key:
description: RubyGems API key
required: true
runs:
using: composite
steps:
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ inputs.ruby-version }}
- run: mkdir -p ~/.gem
shell: bash
- run: |
Expand Down
8 changes: 1 addition & 7 deletions .github/actions/test/action.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
name: Test
description: Run tests
inputs:
ruby-version:
description: Ruby version
required: true
activesupport-version:
description: ActiveSupport version constraint
required: true
runs:
using: composite
steps:
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ inputs.ruby-version }}
- run: gem install activesupport -v "~> ${{ inputs.activesupport-version }}"
- run: bundle add activesupport -v '${{ inputs.activesupport-version }}'
shell: bash
- run: bundle install
shell: bash
Expand Down
29 changes: 18 additions & 11 deletions .github/workflows/test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,42 @@ on:
jobs:
test:
name: >-
Ruby ${{ matrix.ruby }}, ActiveSupport ~> ${{ matrix.activesupport }}
Test
[Ruby ${{ matrix.ruby-version }},
ActiveSupport ${{ matrix.activesupport-version }}]
runs-on: ubuntu-latest
strategy:
matrix:
activesupport:
- "3.2"
- "4.0"
- "5.0"
- "6.0"
- "7.0"
ruby:
activesupport-version:
- ~> 3.2
- ~> 4.0
- ~> 5.0
- ~> 6.0
- ~> 7.0
ruby-version:
- "3.1"
- "3.2"
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
- uses: ./.github/actions/test
with:
ruby-version: ${{ matrix.ruby }}
activesupport-version: ${{ matrix.activesupport }}
activesupport-version: ${{ matrix.activesupport-version }}
push:
name: Publish Gem
if: ${{ github.event.release }}
needs:
- test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-rubygems
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
- uses: ./.github/actions/setup-rubygems
with:
rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY }}
- run: bundle install
- run: bundle exec rake gem:push
2 changes: 1 addition & 1 deletion configs.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Gem::Specification.new do |gem|
gem.license = 'MIT'

gem.add_dependency 'activesupport', '> 3.0'
gem.add_development_dependency 'minitest', '~> 4.0'
gem.add_development_dependency 'minitest', '> 4', '< 5.19'
gem.add_development_dependency 'rake'

gem.required_ruby_version = '~> 3.1'
Expand Down

0 comments on commit aaf45aa

Please sign in to comment.