Skip to content

Commit 9e94255

Browse files
authored
Merge pull request #133 from sue445/feature/rake_all
Add `rake build_all`
2 parents 4df9902 + 3052c5d commit 9e94255

File tree

3 files changed

+88
-14
lines changed

3 files changed

+88
-14
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ jobs:
122122
ruby-version: ruby
123123
bundler-cache: true
124124

125-
- run: bundle exec rake rubocop
125+
- run: bundle exec rake ruby:rubocop
126126

127127
- name: Slack Notification (not success)
128128
uses: act10ns/slack@v2

Rakefile

Lines changed: 31 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,35 @@
22

33
require "rubocop/rake_task"
44

5-
RuboCop::RakeTask.new
5+
RuboCop::RakeTask.new("ruby:rubocop")
66

77
namespace :ruby do
8-
desc "Build ruby/testdata/example/"
9-
task :build_example do
10-
Dir.chdir(File.join(__dir__, "ruby", "testdata", "example")) do
11-
sh "bundle exec rake all"
8+
namespace :example do
9+
desc "Build ruby/testdata/example/"
10+
task :build do
11+
Dir.chdir(File.join(__dir__, "ruby", "testdata", "example")) do
12+
sh "bundle exec rake all"
13+
end
1214
end
1315
end
16+
17+
namespace :rbs do
18+
desc "`rbs collection install` and `git commit`"
19+
task :install do
20+
sh "rbs collection install"
21+
sh "git add rbs_collection.lock.yaml"
22+
sh "git commit -m 'rbs collection install' || true"
23+
end
24+
end
25+
26+
desc "Check rbs"
27+
task :rbs do
28+
sh "rbs validate"
29+
sh "steep check"
30+
end
31+
32+
desc "Run all build tasks in ruby"
33+
task build_all: %w[example:build rubocop rbs]
1434
end
1535

1636
# @return [Hash<String, String>]
@@ -69,6 +89,9 @@ namespace :go do
6989
end
7090
sh env_vars, "golangci-lint run"
7191
end
92+
93+
desc "Run all build tasks in go"
94+
task build_all: %i[test fmt lint]
7295
end
7396

7497
namespace :patch_for_go_gem do
@@ -94,13 +117,6 @@ task :ruby_h_to_go do
94117
sh "./_tools/ruby_h_to_go/exe/ruby_h_to_go"
95118
end
96119

97-
desc "Check rbs"
98-
task :rbs do
99-
sh "rbs collection install"
100-
sh "rbs validate"
101-
sh "steep check"
102-
end
103-
104120
desc "Create and push tag"
105121
task :tag do
106122
version = File.read("VERSION")
@@ -113,4 +129,6 @@ task release: :tag do
113129
sh "git push origin main"
114130
end
115131

116-
task default: "ruby:build_example"
132+
task build_all: %w[ruby:build_all go:build_all ruby_h_to_go:test patch_for_go_gem:test]
133+
134+
task default: :build_all

rbs_collection.lock.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,26 @@
11
---
22
path: ".gem_rbs_collection"
33
gems:
4+
- name: ast
5+
version: '2.4'
6+
source:
7+
type: git
8+
name: ruby/gem_rbs_collection
9+
revision: f5ccba01753a601607c36f3eb1b5b213307300ab
10+
remote: https://github.com/ruby/gem_rbs_collection.git
11+
repo_dir: gems
412
- name: base64
513
version: '0'
614
source:
715
type: stdlib
16+
- name: binding_of_caller
17+
version: '1.0'
18+
source:
19+
type: git
20+
name: ruby/gem_rbs_collection
21+
revision: f5ccba01753a601607c36f3eb1b5b213307300ab
22+
remote: https://github.com/ruby/gem_rbs_collection.git
23+
repo_dir: gems
824
- name: diff-lcs
925
version: '1.5'
1026
source:
@@ -17,6 +33,26 @@ gems:
1733
version: '0'
1834
source:
1935
type: stdlib
36+
- name: logger
37+
version: '0'
38+
source:
39+
type: stdlib
40+
- name: monitor
41+
version: '0'
42+
source:
43+
type: stdlib
44+
- name: optparse
45+
version: '0'
46+
source:
47+
type: stdlib
48+
- name: parser
49+
version: '3.2'
50+
source:
51+
type: git
52+
name: ruby/gem_rbs_collection
53+
revision: f5ccba01753a601607c36f3eb1b5b213307300ab
54+
remote: https://github.com/ruby/gem_rbs_collection.git
55+
repo_dir: gems
2056
- name: rake
2157
version: '13.0'
2258
source:
@@ -25,4 +61,24 @@ gems:
2561
revision: 3670834268f4ea9c10aefeffae7e072b51256375
2662
remote: https://github.com/ruby/gem_rbs_collection.git
2763
repo_dir: gems
64+
- name: ripper
65+
version: '0'
66+
source:
67+
type: stdlib
68+
- name: rspec-parameterized-core
69+
version: 1.0.1
70+
source:
71+
type: rubygems
72+
- name: rspec-parameterized-table_syntax
73+
version: 1.0.1
74+
source:
75+
type: rubygems
76+
- name: yard
77+
version: '0.9'
78+
source:
79+
type: git
80+
name: ruby/gem_rbs_collection
81+
revision: f5ccba01753a601607c36f3eb1b5b213307300ab
82+
remote: https://github.com/ruby/gem_rbs_collection.git
83+
repo_dir: gems
2884
gemfile_lock_path: Gemfile.lock

0 commit comments

Comments
 (0)