From 0dc7d38ac6572a30c1b1cf3d1a9cdc72b19781d1 Mon Sep 17 00:00:00 2001 From: Yoshiki Takagi Date: Sat, 3 Feb 2024 21:56:56 +0900 Subject: [PATCH] CI: using setup-ruby --- .github/workflows/test.yml | 42 ++++++++++++++------------------------ 1 file changed, 15 insertions(+), 27 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3bd54e3..4d2a0f5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,39 +11,27 @@ on: jobs: test: runs-on: ubuntu-latest - container: ${{ matrix.ruby }} strategy: fail-fast: false matrix: ruby: - - ruby:2.6 - - ruby:2.7 - - ruby:3.0 - - ruby:3.1 - - ruby:3.2 - - rubylang/ruby:master-nightly-bionic + - 2.6 + - 2.7 + - '3.0' + - 3.1 + - 3.2 + - head include: - - ruby: rubylang/ruby:master-nightly-bionic - allow_failures: "true" + - ruby: head + allow_failures: 'true' steps: - - uses: actions/checkout@v2 - - name: Cache vendor/bundle - uses: actions/cache@v4 + - uses: actions/checkout@v4 + - name: Setup Ruby + uses: ruby/setup-ruby@v1 with: - path: vendor/bundle - key: v1-gem-${{ runner.os }}-${{ matrix.ruby }}-${{ github.sha }} - restore-keys: | - v1-gem-${{ runner.os }}-${{ matrix.ruby }}- - continue-on-error: ${{ matrix.allow_failures == 'true' }} - - name: bundle update - run: | - set -xe - bundle config path vendor/bundle - bundle update --jobs $(nproc) --retry 3 - continue-on-error: ${{ matrix.allow_failures == 'true' }} - - name: Run ${{ matrix.test_framework }} - run: | - set -xe - bundle exec rspec + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + - name: Run RSpec + run: bundle exec rspec continue-on-error: ${{ matrix.allow_failures == 'true' }}