diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index edede5b..6568a31 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,3 +34,6 @@ jobs: bundler-cache: true # 'bundle install' and cache - name: Run test run: bundle exec rake test + - name: RBS validate + run: bundle exec rbs -r openssl -r digest -r uri -r erb -r singleton -r tempfile -r socket -I sig validate + if: ${{ ! startsWith(matrix.ruby, '2.') }} # rbs requires ruby 3.0+ diff --git a/Gemfile b/Gemfile index f5b6c4b..d069402 100644 --- a/Gemfile +++ b/Gemfile @@ -5,3 +5,6 @@ gemspec gem "rake" gem "test-unit" gem "test-unit-ruby-core" + +# rbs requires ruby 3.0+ +gem "rbs", require: false if !RUBY_VERSION.start_with?('2.')