Skip to content

Commit

Permalink
Dependencies: bump versions
Browse files Browse the repository at this point in the history
* actions/setup-ruby is now deprecated. Use ruby/setup-ruby instead.
* Remove useless dependency installation step now provided by
  ruby/setup-ruby action.
* Bump actions/checkout to v4
* Build on Ubuntu 22.04
* Don't test ruby 2.6 anymore
* Add tests for ruby 3.3
  • Loading branch information
dclaisse committed Mar 25, 2024
1 parent e3d287e commit 5ca993b
Showing 1 changed file with 11 additions and 21 deletions.
32 changes: 11 additions & 21 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,55 +11,45 @@ on:
jobs:
rubocop:
name: Rubocop
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v1
- uses: actions/setup-ruby@v1
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- name: Install dependencies
run: |
gem install bundler
bundler install
bundler-cache: true
- name: Check code
run: bundle exec rubocop

test:
needs: rubocop
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
ruby-version: ['2.6', '2.7', '3.0', '3.1', '3.2']
ruby-version: ['2.7', '3.0', '3.1', '3.2', '3.3']

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Install dependencies
run: |
gem install bundler
bundler install
- name: Run tests
run: bundle exec rspec

publish:
name: Build and Publish to Rubygems
needs: test
if: contains(github.ref, 'refs/tags/')
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v1
- uses: actions/setup-ruby@v1
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- name: Install dependencies
run: |
gem install bundler
bundler install
bundler-cache: true
- name: Build
run: gem build *.gemspec
- name: Push on Rubygems
Expand Down

0 comments on commit 5ca993b

Please sign in to comment.