Support Ruby versions before 3.0 #58
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI Workflow | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| Test-Ruby: | |
| strategy: | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - macos-latest | |
| ruby: | |
| - '2.7' | |
| - '3.0' | |
| - '3.1' | |
| - '3.2' | |
| - '3.3' | |
| - '3.4' | |
| name: Ruby ${{ matrix.ruby }} running on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Check out repository code | |
| uses: actions/checkout@v4 | |
| - name: Install Ruby | |
| uses: ruby/setup-ruby@v1 | |
| env: | |
| BUNDLE_WITH: development | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| bundler: none | |
| - name: Install compatible Bundler for Ruby <= 2.7 | |
| if: startsWith(matrix.ruby, '2') | |
| run: gem install bundler -v '~> 2.4' | |
| - name: Install compatible Bundler for Ruby >= 3.0 | |
| if: startsWith(matrix.ruby, '3') | |
| run: gem install bundler | |
| - name: Debug Environment | |
| run: | | |
| echo "Ruby version: $(ruby -v)" | |
| echo "Bundler version: $(bundle -v)" | |
| - name: Run CI pipeline for the gem | |
| run: bin/check |