From 2e1ed80c4f6ebfa9fcc38344a5e048df768c920b Mon Sep 17 00:00:00 2001 From: Phil Ross Date: Wed, 16 Oct 2024 11:53:32 +0100 Subject: [PATCH] Use the latest Ubuntu and Windows for the majority of tests. - Test all Ruby versions (including head) on the latest Ubuntu and Windows. - Test all OS versions on the latest Ruby. Use the legacy version of setup-ruby where needed. --- .github/workflows/tests.yml | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 71b4782..e418921 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,32 +7,36 @@ jobs: name: ${{ matrix.ruby }} on ${{ matrix.os }}${{ matrix.name_suffix }} strategy: matrix: - os: [ubuntu-20.04, windows-2019] + os: [ubuntu-24.04, windows-2022] ruby: ['2.1', '2.2', '2.3', '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2', '3.3', jruby-9.1, jruby-9.2, jruby-9.3, jruby-9.4] name_suffix: [''] experimental: [false] include: + - os: ubuntu-20.04 + ruby: '3.3' + name_suffix: '' + experimental: false - os: ubuntu-22.04 ruby: '3.3' name_suffix: '' experimental: false - - os: ubuntu-20.04 - ruby: head - name_suffix: ' (experimental)' - experimental: true - - os: ubuntu-20.04 + - os: windows-2019 + ruby: '3.3' + name_suffix: '' + experimental: false + - os: ubuntu-24.04 ruby: jruby-head name_suffix: ' (experimental)' experimental: true - - os: ubuntu-22.04 + - os: ubuntu-24.04 ruby: head name_suffix: ' (experimental)' experimental: true - - os: windows-2019 + - os: windows-2022 ruby: head name_suffix: ' (experimental)' experimental: true - - os: windows-2019 + - os: windows-2022 ruby: jruby-head name_suffix: ' (experimental)' experimental: true @@ -41,7 +45,13 @@ jobs: continue-on-error: ${{ matrix.experimental }} steps: - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@v1 + - if: ((startsWith(matrix.ruby, 'jruby-9.1') || startsWith(matrix.ruby, 'jruby-9.2')) && startsWith(matrix.os, 'ubuntu-') + uses: philr/setup-ruby@legacy-v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + - if: ${{ !(((startsWith(matrix.ruby, 'jruby-9.1') || startsWith(matrix.ruby, 'jruby-9.2')) && startsWith(matrix.os, 'ubuntu-')) }} + uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} bundler-cache: true