Skip to content

Commit 46e5b46

Browse files
authored
ci(coverage): use qlty coverage (#756)
1 parent aa2db72 commit 46e5b46

File tree

4 files changed

+20
-7
lines changed

4 files changed

+20
-7
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
- uses: actions/checkout@v4
4747
- uses: ruby/setup-ruby@v1
4848
with:
49-
ruby-version: 2.7
49+
ruby-version: 3.3
5050
- name: Cache gem
5151
uses: actions/cache@v4
5252
with:
@@ -57,18 +57,20 @@ jobs:
5757
- name: Bundle install
5858
run: |
5959
bundle config path vendor/bundle
60-
gem install bundler -v '2.1.4'
60+
gem install bundler
6161
bundle install
6262
- name: Test
6363
env:
6464
RAILS_ENV: test
65+
MT_NO_PLUGINS: 1
6566
run: |
6667
bundle exec rake test
6768
bundle exec rake db:migrate && bundle exec rspec --color --format doc
68-
# - name: Send coverage
69-
# uses: paambaati/[email protected]
70-
# env:
71-
# CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
69+
- name: Send coverage
70+
uses: qltysh/qlty-action/coverage@8d5c844f32f80364ccc135534671640466e7f610
71+
with:
72+
oidc: true
73+
files: ${{github.workspace}}/coverage/coverage.json:simplecov
7274

7375
deploy:
7476
name: Release

Gemfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ end
2020
group :test do
2121
gem 'rake'
2222
gem 'sqlite3', '~> 1.4'
23-
gem 'simplecov', '~> 0.17.0', require: false
23+
gem 'simplecov', "~> 0.22", require: false
24+
gem 'simplecov_json_formatter', "~> 0.1.4"
2425
end
2526

2627
gem 'rails', '6.1.7.9'

Gemfile.lock

Whitespace-only changes.

spec/spec_helper.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
require 'simplecov'
2+
require 'simplecov_json_formatter'
3+
require 'simplecov-html'
4+
5+
SimpleCov.formatters = [SimpleCov::Formatter::JSONFormatter, SimpleCov::Formatter::HTMLFormatter]
26
SimpleCov.start 'rails'
37
SimpleCov.add_filter ['app/services/forest_liana/ability/fetch.rb', 'lib/forest_liana/version.rb']
48

9+
SimpleCov.coverage_dir 'coverage'
10+
SimpleCov.at_exit do
11+
result = SimpleCov.result
12+
result.format!
13+
end
14+
515
# This file was generated by the `rails generate rspec:install` command. Conventionally, all
616
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
717
# The generated `.rspec` file contains `--require spec_helper` which will cause

0 commit comments

Comments
 (0)