File tree Expand file tree Collapse file tree 3 files changed +46
-1
lines changed Expand file tree Collapse file tree 3 files changed +46
-1
lines changed Original file line number Diff line number Diff line change 1111
1212 build :
1313 needs : ruby-versions
14+ permissions :
15+ contents : read
16+ checks : write
1417 name : build (${{ matrix.ruby }} / ${{ matrix.os }})
1518 strategy :
1619 matrix :
2932 rubygems : 3.5.14
3033 - name : Run test
3134 run : bundle exec rake test
35+
36+ - uses : joshmfrankel/simplecov-check-action@main
37+ if : matrix.os == 'ubuntu-latest' && github.event_name != 'pull_request'
38+ with :
39+ check_job_name : " SimpleCov - ${{ matrix.ruby }}"
40+ minimum_suite_coverage : 90
41+ minimum_file_coverage : 40 # TODO: increase this after switching to SASL::AuthenticationExchange
42+ github_token : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -13,4 +13,10 @@ gem "rdoc"
1313gem "test-unit"
1414gem "test-unit-ruby-core" , git : "https://github.com/ruby/test-unit-ruby-core"
1515
16- gem "benchmark-driver"
16+ gem "benchmark-driver" , require : false
17+
18+ group :test do
19+ gem "simplecov" , require : false
20+ gem "simplecov-html" , require : false
21+ gem "simplecov-json" , require : false
22+ end
Original file line number Diff line number Diff line change 1+ require "simplecov"
2+
3+ # Cannot use ".simplecov" file: simplecov-json triggers a circular require.
4+ require "simplecov-json"
5+ SimpleCov . formatters = SimpleCov ::Formatter ::MultiFormatter . new ( [
6+ SimpleCov ::Formatter ::HTMLFormatter ,
7+ SimpleCov ::Formatter ::JSONFormatter ,
8+ ] )
9+
10+ SimpleCov . start do
11+ command_name "Net::IMAP tests"
12+ enable_coverage :branch
13+ primary_coverage :branch
14+ enable_coverage_for_eval
15+
16+ add_filter "/test/"
17+ add_filter "/rakelib/"
18+
19+ add_group "Parser" , %w[ lib/net/imap/response_parser.rb
20+ lib/net/imap/response_parser ]
21+ add_group "Config" , %w[ lib/net/imap/config.rb
22+ lib/net/imap/config ]
23+ add_group "SASL" , %w[ lib/net/imap/sasl.rb
24+ lib/net/imap/sasl
25+ lib/net/imap/authenticators.rb ]
26+ add_group "StringPrep" , %w[ lib/net/imap/stringprep.rb
27+ lib/net/imap/stringprep ]
28+ end
129require "test/unit"
230require "core_assertions"
331
You can’t perform that action at this time.
0 commit comments