Skip to content

Commit

Permalink
Merge pull request #398 from bastelfreak/action
Browse files Browse the repository at this point in the history
CI: Switch to voxpupuli/ruby-version@v1 & Run release job on Ruby 3.4 & Make release action synchronous
  • Loading branch information
bastelfreak authored Jan 29, 2025
2 parents 04703e6 + a653ce5 commit 2c89fbd
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 19 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
if: github.repository_owner == 'voxpupuli'
steps:
- uses: actions/checkout@v4
- name: Install Ruby 3.3
- name: Install Ruby 3.4
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
ruby-version: '3.4'
env:
BUNDLE_WITHOUT: release
- name: Build gem
Expand All @@ -30,3 +30,8 @@ jobs:
chmod 0600 ~/.gem/credentials
- name: Publish gem to GitHub packages
run: gem push --key github --host https://rubygems.pkg.github.com/voxpupuli *.gem
- name: Wait for release to propagate
shell: bash
run: |
gem install rubygems-await
gem await *.gem
33 changes: 16 additions & 17 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,49 +6,48 @@ on:
branches:
- master

env:
BUNDLE_WITHOUT: release

jobs:
rubocop:
env:
BUNDLE_WITHOUT: release
rubocop_and_matrix:
runs-on: ubuntu-latest
outputs:
ruby: ${{ steps.ruby.outputs.versions }}
steps:
- uses: actions/checkout@v4
- name: Install Ruby ${{ matrix.ruby }}
- name: Install Ruby 3.4
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
ruby-version: '3.4'
bundler-cache: true
- name: Run Rubocop
- name: Run RuboCop
run: bundle exec rake rubocop
- id: ruby
uses: voxpupuli/ruby-version@v1

test:
name: "Ruby ${{ matrix.ruby }}"
runs-on: ubuntu-latest
needs: rubocop_and_matrix
strategy:
fail-fast: false
matrix:
include:
- ruby: "2.7"
- ruby: "3.0"
- ruby: "3.1"
- ruby: "3.2"
- ruby: "3.3"
env:
BUNDLE_WITHOUT: release:rubocop
ruby: ${{ fromJSON(needs.rubocop_and_matrix.outputs.ruby) }}
steps:
- uses: actions/checkout@v4
- name: Install Ruby ${{ matrix.ruby }}
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run tests
run: bundle exec rake
- name: Build gem
- name: Build the gem
run: gem build --strict --verbose *.gemspec

tests:
needs:
- rubocop
- test
runs-on: ubuntu-latest
name: Test suite
Expand Down

0 comments on commit 2c89fbd

Please sign in to comment.