Skip to content

Commit 45fdcb5

Browse files
committed
Add Ruby 3.4 support / generate CI matrix dynamically
1 parent fa27810 commit 45fdcb5

File tree

2 files changed

+19
-11
lines changed

2 files changed

+19
-11
lines changed

.github/workflows/test.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
name: Test
23

34
on:
@@ -10,10 +11,12 @@ env:
1011
BUNDLE_WITHOUT: release
1112

1213
jobs:
13-
rubocop:
14+
rubocop_and_matrix:
1415
env:
1516
BUNDLE_WITHOUT: release
16-
runs-on: ubuntu-latest
17+
runs-on: ubuntu-24.04
18+
outputs:
19+
ruby: ${{ steps.ruby.outputs.versions }}
1720
steps:
1821
- uses: actions/checkout@v4
1922
- name: Install Ruby ${{ matrix.ruby }}
@@ -23,18 +26,17 @@ jobs:
2326
bundler-cache: true
2427
- name: Run Rubocop
2528
run: bundle exec rake rubocop
29+
- id: ruby
30+
uses: voxpupuli/ruby-version@v1
2631

2732
test:
28-
runs-on: ubuntu-latest
33+
needs: rubocop_and_matrix
34+
name: "Ruby ${{ matrix.ruby }}"
35+
runs-on: ubuntu-24.04
2936
strategy:
3037
fail-fast: false
3138
matrix:
32-
include:
33-
- ruby: '2.7'
34-
- ruby: '3.0'
35-
- ruby: '3.1'
36-
- ruby: '3.2'
37-
- ruby: '3.3'
39+
ruby: ${{ fromJSON(needs.rubocop_and_matrix.outputs.ruby) }}
3840
steps:
3941
- uses: actions/checkout@v4
4042
- name: Install Ruby ${{ matrix.ruby }}
@@ -51,9 +53,9 @@ jobs:
5153

5254
tests:
5355
needs:
54-
- rubocop
56+
- rubocop_and_matrix
5557
- test
56-
runs-on: ubuntu-latest
58+
runs-on: ubuntu-24.04
5759
name: Test suite
5860
steps:
5961
- run: echo Test suite completed

Gemfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,9 @@ group :release do
88
gem 'faraday-retry', '~> 2.1', require: false
99
gem 'github_changelog_generator', '~> 1.16.4', require: false
1010
end
11+
12+
# openvox on Ruby 3.3 / 3.4 has some missing dependencies
13+
# Will be fixed in a future openvox release
14+
gem 'base64', '~> 0.2' if RUBY_VERSION >= '3.4'
15+
gem 'racc', '~> 1.8' if RUBY_VERSION >= '3.3'
16+
gem 'syslog', '~> 0.3' if RUBY_VERSION >= '3.4'

0 commit comments

Comments
 (0)