This workflow is for the testing of ruby repositories against a matrix of both ruby and gemfile versions. Ruby versions are provided via input parameter and Gemfiles are automatically parsed out of the calling repository.
Other workflows can run this workflow similar to using a Github Action
Example
---
jobs:
tests:
uses: Invoca/ruby-test-matrix-workflow/.github/workflows/ruby-test-matrix.yml@mainThis default usage will run the rspec test suite using the following matrix strategy
matrix:
ruby: [3.1, 3.2, 3.3, 3.4]
gemfile: // All files from the calling repo that ends with `*gemfile`Parameters can be passed to the workflow using the usual Github Action syntax
uses: Invoca/ruby-test-matrix-workflow/.github/workflows/ruby-test-matrix.yml@main
with:
input-1: "hello"
input-2: "world"-
ruby-versions: (string, optional) The array of ruby versions to use in the matrix (defaults to"[3.1, 3.2, 3.3, 3.4]").with: ruby-versions: "['3.0', 3.1, 3.2, 3.3, 3.4]"
-
pre-test-hook: (string, optional) A hook for running arbitrary commands before tests are run.with: pre-test-hook: "bundle exec rails db:migrate"
-
test-command: (string, optional) The specific test command to run (defaults tobundle exec rspec).with: test-command: "bundle exec rake test"