From 8c811d56380935282b49a48001866c785a9b0ddf Mon Sep 17 00:00:00 2001 From: benjamin wil Date: Wed, 29 Dec 2021 15:11:51 -0800 Subject: [PATCH] Split JRuby CI runs from MRI CI runs We can improve the performance of our MRI test runs by not installing Java as part of their run. (Java is only required for JRuby.) --- .github/workflows/test.yaml | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 902c2dcb..87b50a20 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,11 +1,12 @@ name: Ruby Build on: [push, pull_request] jobs: - build: + jruby_build: + name: JRuby (${{ matrix.ruby }}) runs-on: ubuntu-latest strategy: matrix: - ruby: [2.4.0, 2.6.0, 3.0.0, jruby-9.2.18.0] + ruby: [jruby-9.2.18.0] steps: - run: echo "The job was automatically triggered by a ${{ github.event_name }} event." - run: echo "This job is now running on a ${{ runner.os }} server hosted by GitHub!" @@ -21,9 +22,33 @@ jobs: with: distribution: 'adopt' java-version: '11' + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + - name: Run tests + run: bundle exec rake + mri_build: + name: Ruby (${{ matrix.ruby }}) + runs-on: ubuntu-latest + strategy: + matrix: + ruby: [2.4.0, 2.6.0, 3.0.0] + steps: + - run: echo "The job was automatically triggered by a ${{ github.event_name }} event." + - run: echo "This job is now running on a ${{ runner.os }} server hosted by GitHub!" + - run: echo "The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." + - name: Check out repository code + uses: actions/checkout@v2 + - run: echo "The ${{ github.repository }} repository has been cloned to the runner." + - run: echo "The workflow is now ready to test your code on the runner." + - name: List files in the repository + run: | + ls ${{ github.workspace }} - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} bundler-cache: true - - name: exec rake + - name: Run tests run: bundle exec rake