Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/voxpupuli/ruby-version
Determine the Ruby versions for your testing matrix based on the gemspec
https://github.com/voxpupuli/ruby-version
actions github ruby
Last synced: about 17 hours ago
JSON representation
Determine the Ruby versions for your testing matrix based on the gemspec
- Host: GitHub
- URL: https://github.com/voxpupuli/ruby-version
- Owner: voxpupuli
- License: gpl-3.0
- Created: 2023-07-19T10:52:52.000Z (over 1 year ago)
- Default Branch: v1
- Last Pushed: 2025-01-24T16:28:17.000Z (10 days ago)
- Last Synced: 2025-01-24T17:22:56.647Z (10 days ago)
- Topics: actions, github, ruby
- Language: Ruby
- Homepage: https://github.com/voxpupuli/ruby-version
- Size: 27.3 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ruby version determination
Determine the Ruby versions for your testing matrix based on the gemspec.
Maintaining your CI is tedious and your gem can already specify the compatible Ruby versions using [required_ruby_version](https://guides.rubygems.org/specification-reference/#required_ruby_version).
This action reads your gemspec and provides an output of compatible Ruby versions.## Supported Ruby versions
A static list of compatible versions is maintained.
This is a subset of [setup-ruby's supported versions](https://github.com/ruby/setup-ruby#supported-versions).* 3.4
* 3.3
* 3.2
* 3.1
* 3.0
* 2.7
* 2.6
* 2.5
* 2.4## Example
A minimal example has a single job to determine the Ruby version matrix, using this repository.
Then there should be some task that uses the matrix, but the exact steps likely differ.```yaml
jobs:
setup_matrix:
name: "Determine Ruby versions"
runs-on: ubuntu-latest
outputs:
ruby: ${{ steps.ruby.outputs.versions }}
steps:
- id: ruby
uses: voxpupuli/ruby-version@v1test:
name: "Ruby ${{ matrix.ruby }}"
runs-on: ubuntu-latest
needs: setup_matrix
strategy:
matrix:
ruby: ${{ fromJSON(needs.setup_matrix.outputs.ruby) }}
steps:
- uses: actions/checkout@v4
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run tests
run: bundle exec rake test
```