Skip to content

Commit ca6a992

Browse files
committed
Create github ruby test action
1 parent fe0323a commit ca6a992

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed

.github/workflows/ruby.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7+
8+
name: Ruby
9+
10+
on:
11+
push:
12+
branches: [ "main" ]
13+
pull_request:
14+
branches: [ "main" ]
15+
16+
permissions:
17+
contents: read
18+
19+
jobs:
20+
test:
21+
22+
runs-on: ubuntu-latest
23+
strategy:
24+
matrix:
25+
ruby-version: [ '3.1', '3.2', '3.3' ]
26+
27+
steps:
28+
- uses: actions/checkout@v4
29+
- name: Set up Ruby
30+
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
31+
# change this to (see https://github.com/ruby/setup-ruby#versioning):
32+
uses: ruby/setup-ruby@v1
33+
# uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
34+
with:
35+
ruby-version: ${{ matrix.ruby-version }}
36+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
37+
- name: Run tests
38+
run: bundle exec rake

attributed-string.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ Gem::Specification.new do |spec|
1818
spec.metadata["homepage_uri"] = "https://github.com/instruct-rb/attributed-string"
1919

2020

21-
spec.required_ruby_version = ">= 3.2.3"
21+
spec.required_ruby_version = ">= 3.1"
2222
end

0 commit comments

Comments
 (0)