Skip to content

Commit

Permalink
Add lcov format, update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
delonnewman committed Oct 11, 2024
1 parent c61c9a3 commit 3c18f59
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .github/workflows/rubyonrails.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ jobs:
run: bundle exec rails db:schema:load db:seed
- name: Run tests
run: bundle exec rake
- name: Publish code coverage
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: "7b61fa9ea465e19ec3d750aafc3622cba4bf8b257d61f9ea20c46900bbe03fda"
with:
coverageLocations: |
${{github.workspace}}/coverage/lcov/dragnet.lcov:lcov
debug: true

lint:
runs-on: ubuntu-latest
Expand All @@ -46,6 +54,7 @@ jobs:
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
# Add or replace any other lints here
- name: Security audit dependencies
run: bundle exec rake bundle:audit:update bundle:audit:check
- name: Security audit application code
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,4 @@ app/assets/javascripts/frontend/.calva/output-window/output.calva-repl
/coverage/.last_run.json
/coverage/.resultset.json.lock
/coverage/.resultset.json
/coverage/lcov/
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ end
group :test do
gem 'simplecov', require: false
gem 'simplecov-small-badge', require: false
gem 'simplecov-lcov', require: false

gem 'rails-controller-testing'
end

Expand Down
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,7 @@ GEM
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov-lcov (0.8.0)
simplecov-small-badge (0.2.7)
repo-small-badge (~> 0.2.10)
simplecov (~> 0.18)
Expand Down Expand Up @@ -541,6 +542,7 @@ DEPENDENCIES
sentimental
shortuuid
simplecov
simplecov-lcov
simplecov-small-badge
sprockets-rails
transit-rails
Expand Down
5 changes: 4 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@

require 'simplecov'
require 'simplecov_small_badge'
require 'simplecov-lcov'

SimpleCov.start('rails') do
SimpleCov::Formatter::LcovFormatter.config.report_with_single_file = true
SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new([
SimpleCov::Formatter::HTMLFormatter,
SimpleCovSmallBadge::Formatter
SimpleCovSmallBadge::Formatter,
SimpleCov::Formatter::LcovFormatter,
])
end

Expand Down

0 comments on commit 3c18f59

Please sign in to comment.