Skip to content

Commit 2436a4e

Browse files
committed
Add Steep for type checking
Add `steep` to Gemfile, add `steep` rake task, and add `typecheck` GitHub workflow.
1 parent 87d1e45 commit 2436a4e

File tree

4 files changed

+45
-0
lines changed

4 files changed

+45
-0
lines changed

.github/workflows/typecheck.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: typecheck
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
steep:
7+
runs-on: ubuntu-latest
8+
env:
9+
BUNDLE_GEMFILE: Gemfile.steep
10+
steps:
11+
- uses: actions/checkout@v6
12+
- name: Set up Ruby
13+
uses: ruby/setup-ruby@v1
14+
with:
15+
ruby-version: "ruby"
16+
bundler-cache: true
17+
- name: Type check
18+
run: bundle exec rake steep

Gemfile.steep

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
source "https://rubygems.org"
2+
3+
gem "rake"
4+
gem "rbs", "~> 3.9"
5+
gem "steep"

Rakefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ Rake::TestTask.new(:test) do |t|
88
t.test_files = FileList["test/**/test_*.rb"]
99
end
1010

11+
desc "Type check with Steep"
12+
task :steep do
13+
sh "steep check"
14+
end
15+
1116
namespace :rbs do
1217
Rake::TestTask.new(:test) do |t|
1318
t.libs << "test_sig"

Steepfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
target :lib do
2+
check "lib"
3+
signature "sig"
4+
5+
library "cgi"
6+
library "open-uri"
7+
library "net-protocol"
8+
library "openssl"
9+
library "resolv"
10+
library "securerandom"
11+
library "socket"
12+
library "strscan"
13+
library "tempfile"
14+
library "timeout"
15+
library "uri"
16+
library "zlib"
17+
end

0 commit comments

Comments
 (0)