File tree 3 files changed +29
-5
lines changed
3 files changed +29
-5
lines changed Original file line number Diff line number Diff line change @@ -47,20 +47,34 @@ jobs:
47
47
with :
48
48
ruby-version : " ${{ matrix.ruby }}"
49
49
bundler-cache : true
50
- - run : NO_COVERAGE=true bundle exec rake spec
50
+ - run : bundle exec rake spec
51
51
env :
52
52
PARSER_ENGINE : ${{ matrix.parser_engine }}
53
+ - name : Upload Coverage Artifact
54
+ uses : actions/upload-artifact@v4
55
+ with :
56
+ name : coverage-ubuntu-${{ matrix.ruby }}-${{ matrix.parser_engine }}
57
+ path : coverage/.resultset.json
58
+ if-no-files-found : error
59
+ include-hidden-files : true
53
60
54
61
coverage :
62
+ name : Check Coverage
63
+ needs : main
55
64
runs-on : ubuntu-latest
56
- name : " Test coverage "
65
+
57
66
steps :
58
67
- uses : actions/checkout@v4
68
+ - uses : actions/download-artifact@v4
69
+ name : Download Coverage Artifacts
70
+ with :
71
+ pattern : coverage-*
59
72
- uses : ruby/setup-ruby@v1
60
73
with :
61
- ruby-version : " 3.4 "
74
+ ruby-version : ruby # Latest stable CRuby version
62
75
bundler-cache : true
63
- - run : bundle exec rake spec
76
+
77
+ - run : bundle exec rake coverage:ci
64
78
65
79
edge-rubocop :
66
80
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 3
3
require 'rubocop'
4
4
require 'rubocop/rspec/support'
5
5
6
- require 'simplecov' unless ENV [ 'NO_COVERAGE' ]
6
+ require 'simplecov' unless ENV [ 'NO_COVERAGE' ] || RUBY_ENGINE == 'jruby'
7
7
8
8
module SpecHelper
9
9
ROOT = Pathname . new ( __dir__ ) . parent . freeze
Original file line number Diff line number Diff line change
1
+ # frozen_string_literal: true
2
+
3
+ namespace :coverage do
4
+ desc 'Report Coverage from merged CI runs'
5
+ task :ci do
6
+ require 'simplecov'
7
+
8
+ SimpleCov . collate Dir [ 'coverage-*/.resultset.json' ]
9
+ end
10
+ end
You can’t perform that action at this time.
0 commit comments