File tree Expand file tree Collapse file tree 3 files changed +110
-0
lines changed Expand file tree Collapse file tree 3 files changed +110
-0
lines changed Original file line number Diff line number Diff line change 1+ # .github/workflows/ci.yml
2+
3+ name : Test
4+ on :
5+ push :
6+ branches :
7+ - main
8+ pull_request :
9+ branches :
10+ - main
11+ env :
12+ COVERAGE : true
13+ CODECOV_TOKEN : d7028c0e-97c5-485f-85e5-f63daabeef63
14+ jobs :
15+ test-ruby-2-4-x :
16+ runs-on : ubuntu-latest
17+
18+ steps :
19+ - uses : actions/checkout@v1
20+ - name : Setup Ruby
21+ uses : ruby/setup-ruby@v1
22+ with :
23+ ruby-version : 2.4
24+ bundler-cache : true
25+ - name : Build and run tests
26+ run : |
27+ gem install bundler
28+ bundle install --jobs 4 --retry 3
29+ bundle exec rake test
30+ test-ruby-2-5-x :
31+ runs-on : ubuntu-latest
32+
33+ steps :
34+ - uses : actions/checkout@v1
35+ - name : Setup Ruby
36+ uses : ruby/setup-ruby@v1
37+ with :
38+ ruby-version : 2.5
39+ bundler-cache : true
40+ - name : Build and run tests
41+ run : |
42+ gem install bundler
43+ bundle install --jobs 4 --retry 3
44+ bundle exec rake test
45+ test-ruby-2-6-x :
46+ runs-on : ubuntu-latest
47+
48+ steps :
49+ - uses : actions/checkout@v1
50+ - name : Setup Ruby
51+ uses : ruby/setup-ruby@v1
52+ with :
53+ ruby-version : 2.6
54+ bundler-cache : true
55+ - name : Build and run tests
56+ run : |
57+ gem install bundler
58+ bundle install --jobs 4 --retry 3
59+ bundle exec rake test
60+ test-ruby-2-7-x :
61+ runs-on : ubuntu-latest
62+
63+ steps :
64+ - uses : actions/checkout@v1
65+ - name : Setup Ruby
66+ uses : ruby/setup-ruby@v1
67+ with :
68+ ruby-version : 2.7
69+ bundler-cache : true
70+ - name : Build and run tests
71+ run : |
72+ gem install bundler
73+ bundle install --jobs 4 --retry 3
74+ bundle exec rake test
75+ test-ruby-3-0-x :
76+ runs-on : ubuntu-latest
77+
78+ steps :
79+ - uses : actions/checkout@v1
80+ - name : Setup Ruby
81+ uses : ruby/setup-ruby@v1
82+ with :
83+ ruby-version : 3.0
84+ bundler-cache : true
85+ - name : Build and run tests
86+ run : |
87+ gem install bundler
88+ bundle install --jobs 4 --retry 3
89+ bundle exec rake test
Original file line number Diff line number Diff line change @@ -21,6 +21,9 @@ Gem::Specification.new do |spec|
2121 spec . add_dependency "rake"
2222 spec . add_development_dependency "bundler" , ">= 1.6" , "< 3.0"
2323 spec . add_development_dependency "byebug"
24+ spec . add_development_dependency "codecov"
2425 spec . add_development_dependency "minitest"
2526 spec . add_development_dependency "minitest-around"
27+ spec . add_development_dependency "simplecov"
28+ spec . add_development_dependency "simplecov-console"
2629end
Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
3+ if ENV [ "COVERAGE" ] == "true"
4+ require "simplecov"
5+ require "simplecov-console"
6+ require "codecov"
7+
8+ SimpleCov . formatter = SimpleCov ::Formatter ::MultiFormatter [
9+ SimpleCov ::Formatter ::HTMLFormatter ,
10+ SimpleCov ::Formatter ::Console ,
11+ SimpleCov ::Formatter ::Codecov ,
12+ ]
13+
14+ SimpleCov . start do
15+ track_files "lib/**/*.rb"
16+ end
17+
18+ puts "Using SimpleCov v#{ SimpleCov ::VERSION } "
19+ end
20+
321require "byebug"
422
523require "minitest/autorun"
You can’t perform that action at this time.
0 commit comments