diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2202c3d..32b4d9f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,11 +3,13 @@ name: Test on: [push, pull_request] jobs: + ruby-versions: + uses: ruby/actions/.github/workflows/ruby_versions.yml@master + with: + min_version: 2.5 + test: - strategy: - fail-fast: false - matrix: - ruby-version: [3.2, 3.1, '3.0', 2.7, 2.6, 2.5] + needs: ruby-versions # From https://docs.github.com/en/actions/guides/creating-redis-service-containers services: @@ -21,15 +23,26 @@ jobs: ports: - 6379:6379 - runs-on: ubuntu-latest + name: Test (${{ matrix.ruby }} / ${{ matrix.os }}) + strategy: + matrix: + ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }} + os: [ubuntu-latest, macos-latest, windows-latest] + # exclude: + # - { ruby: jruby } + # - { ruby: jruby-head } + # - { ruby: truffleruby } + # - { ruby: truffleruby-head } + + runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Set up Ruby ${{ matrix.ruby-version }} + - name: Set up Ruby ${{ matrix.ruby }} uses: ruby/setup-ruby@v1 with: bundler-cache: true - ruby-version: ${{ matrix.ruby-version }} + ruby-version: ${{ matrix.ruby }} - name: Run tests & lint run: bundle exec rake