Skip to content

Commit 2fdd257

Browse files
authored
Add ruby.yml for github actions (#5)
1 parent 3c53175 commit 2fdd257

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed

.github/workflows/ruby.yml

Lines changed: 38 additions & 0 deletions
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: [ "master" ]
13+
pull_request:
14+
branches: [ "master" ]
15+
16+
permissions:
17+
contents: read
18+
19+
jobs:
20+
test:
21+
22+
runs-on: ubuntu-latest
23+
strategy:
24+
matrix:
25+
ruby-version: ['2.6', '2.7', '3.0', '3.1']
26+
27+
steps:
28+
- uses: actions/checkout@v3
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@0a29871fe2b0200a17a4497bae54fe5df0d973aa # v1.115.3
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 spec

typed_struct.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
1212
spec.description = "All the flexibility of a Ruby Struct, but with type checking on its properties. Also benefit from being able to define complex types using RBS type notation."
1313
spec.homepage = "https://github.com/johansenja/typed_struct"
1414
spec.license = "MIT"
15-
spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
15+
spec.required_ruby_version = Gem::Requirement.new(">= 2.6.0")
1616

1717
spec.metadata["allowed_push_host"] = "https://rubygems.org"
1818

0 commit comments

Comments
 (0)