File tree 2 files changed +40
-1
lines changed
2 files changed +40
-1
lines changed Original file line number Diff line number Diff line change 24
24
ruby-version : ${{ matrix.ruby }}
25
25
- name : Test
26
26
run : bundle exec rake test
27
+
28
+ check :
29
+ name : Check
30
+ runs-on : ubuntu-latest
31
+ env :
32
+ CI : true
33
+ steps :
34
+ - uses : actions/checkout@master
35
+ - uses : ruby/setup-ruby@v1
36
+ with :
37
+ bundler-cache : true
38
+ ruby-version : ' 3.1'
39
+ - name : Check
40
+ run : bundle exec rake check
41
+
27
42
automerge :
28
43
name : AutoMerge
29
- needs : ci
44
+ needs :
45
+ - ci
46
+ - check
30
47
runs-on : ubuntu-latest
31
48
if : github.event_name == 'pull_request_target' && github.actor == 'dependabot[bot]'
32
49
steps :
Original file line number Diff line number Diff line change @@ -10,3 +10,25 @@ Rake::TestTask.new(:test) do |t|
10
10
end
11
11
12
12
task default : :test
13
+
14
+ FILEPATHS = %w[
15
+ Gemfile
16
+ Rakefile
17
+ syntax_tree.gemspec
18
+ lib/**/*.rb
19
+ test/*.rb
20
+ ] . freeze
21
+
22
+ task :syntax_tree do
23
+ $:. unshift File . expand_path ( "lib" , __dir__ )
24
+ require "syntax_tree"
25
+ require "syntax_tree/cli"
26
+ end
27
+
28
+ task check : :syntax_tree do
29
+ exit SyntaxTree ::CLI . run ( [ "check" ] + FILEPATHS )
30
+ end
31
+
32
+ task format : :syntax_tree do
33
+ exit SyntaxTree ::CLI . run ( [ "write" ] + FILEPATHS )
34
+ end
You can’t perform that action at this time.
0 commit comments