From 2eb868ac5609f39905a95038a7451fdf97841a8c Mon Sep 17 00:00:00 2001 From: m-nakamura145 Date: Fri, 19 Jan 2024 09:18:19 +0900 Subject: [PATCH] Use ruby/actions workflow for ruby versions --- .github/workflows/protocol.yml | 11 +++++++++-- .github/workflows/ruby-macos.yaml | 10 ++++++++-- .github/workflows/ruby.yml | 11 +++++++++-- .github/workflows/test_test.yml | 11 +++++++++-- 4 files changed, 35 insertions(+), 8 deletions(-) diff --git a/.github/workflows/protocol.yml b/.github/workflows/protocol.yml index 755557039..3b61c026c 100644 --- a/.github/workflows/protocol.yml +++ b/.github/workflows/protocol.yml @@ -7,14 +7,21 @@ on: branches: [ master ] jobs: - test: + ruby-versions: + uses: ruby/actions/.github/workflows/ruby_versions.yml@master + with: + engine: cruby + min_version: 2.7 + versions: '["debug"]' + test: + needs: ruby-versions runs-on: ubuntu-latest timeout-minutes: 10 strategy: fail-fast: false matrix: - ruby-version: ["2.7", "3.0", "3.1", "3.2", "3.3", "head", "debug"] + ruby-version: ${{ fromJson(needs.ruby-versions.outputs.versions) }} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/ruby-macos.yaml b/.github/workflows/ruby-macos.yaml index 4b04e8647..4e17a3370 100644 --- a/.github/workflows/ruby-macos.yaml +++ b/.github/workflows/ruby-macos.yaml @@ -7,14 +7,20 @@ on: branches: [ master ] jobs: - test: + ruby-versions: + uses: ruby/actions/.github/workflows/ruby_versions.yml@master + with: + engine: cruby + min_version: 3.2 + test: + needs: ruby-versions runs-on: macos-latest timeout-minutes: 15 strategy: fail-fast: false matrix: - ruby-version: ["3.2", "3.3", "head"] + ruby-version: ${{ fromJson(needs.ruby-versions.outputs.versions) }} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index dd76ced54..56d5d0681 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -7,14 +7,21 @@ on: branches: [ master ] jobs: - test: + ruby-versions: + uses: ruby/actions/.github/workflows/ruby_versions.yml@master + with: + engine: cruby + min_version: 2.7 + versions: '["debug"]' + test: + needs: ruby-versions runs-on: ubuntu-latest timeout-minutes: 30 strategy: fail-fast: false matrix: - ruby-version: ["2.7", "3.0", "3.1", "3.2", "3.3", "head", "debug"] + ruby-version: ${{ fromJson(needs.ruby-versions.outputs.versions) }} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/test_test.yml b/.github/workflows/test_test.yml index 3123697fe..58b1580e7 100644 --- a/.github/workflows/test_test.yml +++ b/.github/workflows/test_test.yml @@ -7,14 +7,21 @@ on: branches: [ master ] jobs: - test: + ruby-versions: + uses: ruby/actions/.github/workflows/ruby_versions.yml@master + with: + engine: cruby + min_version: 3.0 + versions: '["debug"]' + test: + needs: ruby-versions runs-on: ubuntu-latest timeout-minutes: 30 strategy: fail-fast: false matrix: - ruby-version: ["3.0", "3.1", "3.2", "3.3", "head", "debug"] + ruby-version: ${{ fromJson(needs.ruby-versions.outputs.versions) }} steps: - uses: actions/checkout@v4