diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 716d0be..457372b 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -1,25 +1,30 @@ name: Ruby -on: [push, pull_request] +on: + pull_request: + push: + workflow_dispatch: jobs: - build: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + ruby-version: "3.3" + - run: bundle exec rubocop + test: + runs-on: ubuntu-latest strategy: + fail-fast: false matrix: - ruby_version: [3.3, 3.2, 3.1] - - runs-on: ubuntu-latest - + ruby: [3.3, 3.2, 3.1] steps: - - uses: actions/checkout@v4 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ matrix.ruby_version }} - - - name: Build and test with Rake - run: | - gem install bundler - bundle install --jobs 4 --retry 3 - bundle exec rspec - bundle exec rubocop + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + ruby-version: ${{ matrix.ruby }} + - run: bundle exec rspec