diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9c32cb19..1a6d550b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,6 +1,17 @@ name: test -on: [push, pull_request] +# doc/ 等ドキュメントだけの変更では CI を回さない(doctree と同様) +on: + push: + paths-ignore: + - 'doc/**' + - 'README.md' + - 'ChangeLog' + pull_request: + paths-ignore: + - 'doc/**' + - 'README.md' + - 'ChangeLog' jobs: ruby-versions: @@ -33,6 +44,26 @@ jobs: - name: Run test run: bundle exec rake + typecheck: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + # 型検査は1バージョンで回せば十分(バージョン網羅は build ジョブが担う)。 + # rbs 3.10 / steep 1.9(Gemfile.lock で固定)の検証済み環境である 3.4 を使う + ruby-version: '3.4' + bundler-cache: true + - name: Install RBS collection + # --frozen: rbs_collection.lock.yaml のとおりに取得する。 + # 再解決すると gem_rbs_collection の revision が動き、環境差も出るため + run: bundle exec rbs collection install --frozen + # sig/ が lib/ の全宣言をカバーしているか(rbs subtract の残余ゼロ)+ rbs validate + - name: Check sig coverage + run: bundle exec rake sig + - name: Run steep check + run: bundle exec steep check + rurema: needs: ruby-versions runs-on: ubuntu-latest diff --git a/rbs_collection.yaml b/rbs_collection.yaml index d9516eb6..5e6d7c7d 100644 --- a/rbs_collection.yaml +++ b/rbs_collection.yaml @@ -21,6 +21,16 @@ gems: - name: steep ignore: true + # bitclust 自身(path gem)は sig/ を持つため、コレクション解決に + # 含まれると Steepfile の signature "sig" と二重ロードになり + # DuplicatedDeclaration で steep が失敗する。必ず除外する + - name: bitclust-core + ignore: true + - name: bitclust-dev + ignore: true + - name: refe2 + ignore: true + - name: date #- name: drb - name: erb