Skip to content

Commit 9f4ce9d

Browse files
authored
Merge pull request #232 from znz/ci-typecheck
CI で rake sig と steep check を回す
2 parents 092218e + 5f440af commit 9f4ce9d

2 files changed

Lines changed: 42 additions & 1 deletion

File tree

.github/workflows/test.yml

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
name: test
22

3-
on: [push, pull_request]
3+
# doc/ 等ドキュメントだけの変更では CI を回さない(doctree と同様)
4+
on:
5+
push:
6+
paths-ignore:
7+
- 'doc/**'
8+
- 'README.md'
9+
- 'ChangeLog'
10+
pull_request:
11+
paths-ignore:
12+
- 'doc/**'
13+
- 'README.md'
14+
- 'ChangeLog'
415

516
jobs:
617
ruby-versions:
@@ -33,6 +44,26 @@ jobs:
3344
- name: Run test
3445
run: bundle exec rake
3546

47+
typecheck:
48+
runs-on: ubuntu-latest
49+
steps:
50+
- uses: actions/checkout@v4
51+
- uses: ruby/setup-ruby@v1
52+
with:
53+
# 型検査は1バージョンで回せば十分(バージョン網羅は build ジョブが担う)。
54+
# rbs 3.10 / steep 1.9(Gemfile.lock で固定)の検証済み環境である 3.4 を使う
55+
ruby-version: '3.4'
56+
bundler-cache: true
57+
- name: Install RBS collection
58+
# --frozen: rbs_collection.lock.yaml のとおりに取得する。
59+
# 再解決すると gem_rbs_collection の revision が動き、環境差も出るため
60+
run: bundle exec rbs collection install --frozen
61+
# sig/ が lib/ の全宣言をカバーしているか(rbs subtract の残余ゼロ)+ rbs validate
62+
- name: Check sig coverage
63+
run: bundle exec rake sig
64+
- name: Run steep check
65+
run: bundle exec steep check
66+
3667
rurema:
3768
needs: ruby-versions
3869
runs-on: ubuntu-latest

rbs_collection.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@ gems:
2121
- name: steep
2222
ignore: true
2323

24+
# bitclust 自身(path gem)は sig/ を持つため、コレクション解決に
25+
# 含まれると Steepfile の signature "sig" と二重ロードになり
26+
# DuplicatedDeclaration で steep が失敗する。必ず除外する
27+
- name: bitclust-core
28+
ignore: true
29+
- name: bitclust-dev
30+
ignore: true
31+
- name: refe2
32+
ignore: true
33+
2434
- name: date
2535
#- name: drb
2636
- name: erb

0 commit comments

Comments
 (0)