diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5c1eecc..b3e2738 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: CI: true strategy: matrix: - ruby-version: ['3.0', '3.1', '3.2'] + ruby-version: ['3.1', '3.2', '3.3'] steps: - name: Checkout code uses: actions/checkout@v3 @@ -39,3 +39,18 @@ jobs: bundler-cache: true - name: Lint Ruby files run: bundle exec rubocop --parallel + + typecheck: + runs-on: ubuntu-latest + env: + CI: true + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Install Ruby and gems + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.2' + bundler-cache: true + - name: Typecheck Ruby files + run: bundle exec srb tc diff --git a/.rubocop.yml b/.rubocop.yml index ec38420..b561240 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -2,7 +2,7 @@ inherit_gem: rubocop-espago: rubocop.yml AllCops: - TargetRubyVersion: 3.0 + TargetRubyVersion: 3.1 Exclude: - lib/tapioca/**/*.rb diff --git a/Gemfile b/Gemfile index 06d75a4..8d4028b 100644 --- a/Gemfile +++ b/Gemfile @@ -11,4 +11,5 @@ gem 'rake', '~> 13.0' # automation tasks gem 'rubocop-espago', '~> 1.0' # ruby linter gem 'shoulda-context', '~> 2.0' # more pleasant test syntax gem 'solargraph', '~> 0.48' # language server +gem 'sorbet', '>= 0.5' # static typechecker gem 'tapioca', '> 0.13' # RBI generator for sorbet diff --git a/Gemfile.lock b/Gemfile.lock index 6ddbd22..51927e6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -120,6 +120,7 @@ DEPENDENCIES shale-builder! shoulda-context (~> 2.0) solargraph (~> 0.48) + sorbet (>= 0.5) tapioca (> 0.13) BUNDLED WITH diff --git a/shale-builder.gemspec b/shale-builder.gemspec index 6dafef3..c3ce5f2 100644 --- a/shale-builder.gemspec +++ b/shale-builder.gemspec @@ -12,7 +12,7 @@ Gem::Specification.new do |spec| spec.description = spec.summary spec.homepage = 'https://github.com/Verseth/ruby-shale-builder' spec.license = 'MIT' - spec.required_ruby_version = '>= 3.0.0' + spec.required_ruby_version = '>= 3.1.0' spec.metadata['homepage_uri'] = spec.homepage spec.metadata['source_code_uri'] = spec.homepage