From f751ed38b6d913ebb20a67b937e16815f4d7e085 Mon Sep 17 00:00:00 2001 From: Shizuo Fujita Date: Fri, 13 Mar 2026 15:51:16 +0900 Subject: [PATCH] CI: Introduce ruby_versions.yml to add supported Ruby versions automatically Signed-off-by: Shizuo Fujita --- .github/workflows/linux.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 4e7becd..ba4b56e 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -1,14 +1,26 @@ name: linux on: - - push - - pull_request + push: + branches: [master] + pull_request: + branches: [master] + schedule: + - cron: '0 0 1 * *' jobs: + ruby-versions: + uses: ruby/actions/.github/workflows/ruby_versions.yml@master + with: + engine: cruby + min_version: 2.7 build: + needs: ruby-versions runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - ruby: [ '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2', '3.3', '3.4', '4.0' ] + ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }} + exclude: + - ruby: head postgres: [ '9', '10', '11', '12', '13' ] os: - ubuntu-latest @@ -26,7 +38,7 @@ jobs: --health-interval 10s --health-timeout 5s --health-retries 5 - name: Ruby ${{ matrix.ruby }} unit testing on ${{ matrix.os }} + name: Ruby ${{ matrix.ruby }} unit testing with PostgreSQL ${{ matrix.postgres }} steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: ruby/setup-ruby@6ca151fd1bfcfd6fe0c4eb6837eb0584d0134a0c # v1.290.0