Skip to content

Commit 2a6b7ee

Browse files
committed
Add Steep for type checking
Add `steep` to Gemfile, add `steep` rake task, and add `typecheck` GitHub workflow.
1 parent 5aaff92 commit 2a6b7ee

File tree

4 files changed

+39
-0
lines changed

4 files changed

+39
-0
lines changed

.github/workflows/typecheck.yml

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

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ source "https://rubygems.org"
33
gemspec
44

55
gem "rake"
6+
gem "steep"
67
gem "test-unit"
78
gem "test-unit-ruby-core"
89

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)