Skip to content

Commit 653da92

Browse files
committed
Split testing into lib and sig
1 parent 7c390fd commit 653da92

File tree

5 files changed

+21
-16
lines changed

5 files changed

+21
-16
lines changed

.github/workflows/sig.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
1-
name: RBS Comments
1+
name: sig
22

3-
on:
4-
push:
5-
branches:
6-
- master
7-
pull_request: {}
8-
merge_group: {}
3+
on: [push, pull_request]
94

105
jobs:
116
ruby-versions:
@@ -19,6 +14,8 @@ jobs:
1914
with:
2015
ruby-version: ${{ needs.ruby-versions.outputs.latest }}
2116
- name: Install dependencies
22-
run: bundle install
17+
run: |
18+
bundle config set with 'sig'
19+
bundle install
2320
- name: Run RBS annotate and confirm
24-
run: bundle exec rake 'rbs:annotate' 'rbs:confirm'
21+
run: bundle exec rake rbs:{test,annotate,confirm}

.github/workflows/test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ jobs:
2727
with:
2828
ruby-version: ${{ matrix.ruby }}
2929
- name: Install dependencies
30-
run: bundle install
30+
run: |
31+
bundle config set without 'sig'
32+
bundle install
3133
- name: Run test
3234
run: rake test

Gemfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,8 @@ source "https://rubygems.org"
22

33
gem "rake"
44
gem "test-unit"
5-
gem "rbs"
6-
gem "rdoc", '6.11' # `rbs annotate` can only support up to rdoc 6.11.
5+
6+
group :sig do
7+
gem "rbs"
8+
gem "rdoc", '6.11'
9+
end

Rakefile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,17 @@ Rake::TestTask.new(:test) do |t|
88
end
99

1010
namespace :rbs do
11+
task :test do
12+
sh "ruby -I lib test_sig/test_base64.rb"
13+
end
14+
1115
task :annotate do
1216
require "tmpdir"
1317
require "pathname"
1418

15-
Dir.mktmpdir do |dir|
16-
path = Pathname(dir)
17-
system("rdoc --ri --output #{path}/doc --root=. lib")
18-
system("rbs annotate --no-system --no-gems --no-site --no-home -d #{path}/doc sig")
19+
Dir.mktmpdir do |tmpdir|
20+
system("rdoc --ri --output #{tmpdir}/doc --root=. lib")
21+
system("rbs annotate --no-system --no-gems --no-site --no-home -d #{tmpdir}/doc sig")
1922
end
2023
end
2124

0 commit comments

Comments
 (0)