diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 71c6cbb78..dce16c017 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -29,7 +29,7 @@ jobs: job: stdlib_test rubyopt: "--enable-frozen-string-literal" - ruby: "3.3" - job: lexer compile confirm_lexer + job: lexer templates compile confirm_lexer confirm_templates - ruby: "3.3" job: rubocop validate test_doc build test_generate_stdlib raap - ruby: "3.3" diff --git a/Rakefile b/Rakefile index 19d0e3f97..908555fa8 100644 --- a/Rakefile +++ b/Rakefile @@ -30,6 +30,11 @@ task :confirm_lexer => :lexer do sh "git diff --exit-code ext/rbs_extension/lexer.c" end +task :confirm_templates => :templates do + puts "Testing if generated code under include and src is updated with respect to templates" + sh "git diff --exit-code -- include src" +end + rule ".c" => ".re" do |t| puts "⚠️⚠️⚠️ #{t.name} is older than #{t.source}. You may need to run `rake lexer` ⚠️⚠️⚠️" end