diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f17764f..efcdbd7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,7 +6,7 @@ jobs: fail-fast: false matrix: os: [ 'ubuntu-16.04', 'ubuntu-18.04', 'macos-latest' ] - ruby: [ 'ruby-2.6.5', '2.7.0', 'truffleruby', 'jruby-9.2.9.0' ] + ruby: [ '2.4.9', '2.5.7', '2.6.5', '2.7.0', 'truffleruby', 'jruby' ] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 diff --git a/README.md b/README.md index 991fc46..99830b9 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ The prebuilt rubies are generated by https://github.com/eregon/ruby-install-buil ## Usage -Single job: +### Single Job ```yaml name: My workflow @@ -30,7 +30,7 @@ jobs: - run: ruby -v ``` -Matrix: +### Matrix ```yaml name: My workflow @@ -52,9 +52,33 @@ jobs: ``` If a specific version is not given, it uses the latest stable release of that implementation. - For instance `truffleruby` is currently the same as `truffleruby-19.3.0`. +If it's just a version number (e.g., `2.6.5`), then MRI is assumed (same as `ruby-2.6.5`). + +### All Stable Versions + +With that, we can test on all stable releases of MRI, JRuby and TruffleRuby with: + +```yaml +name: My workflow +on: [push] +jobs: + test: + strategy: + fail-fast: false + matrix: + os: [ 'ubuntu-latest', 'macos-latest' ] + ruby: [ '2.4.9', '2.5.7', '2.6.5', '2.7.0', 'truffleruby', 'jruby' ] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - uses: eregon/use-ruby-action@master + with: + ruby-version: ${{ matrix.ruby }} + - run: ruby -v +``` + ## Efficiency It takes about 5 seconds to setup the given Ruby.