Skip to content

Commit 80efa07

Browse files
committed
simplecov coverage
1 parent 29c825c commit 80efa07

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

.github/workflows/test_build_push.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,14 @@ jobs:
7575

7676
- run: bundle exec rspec
7777

78+
- name: Upload coverage report
79+
uses: actions/upload-artifact@v4
80+
if: always()
81+
with:
82+
name: coverage-report
83+
path: coverage/
84+
retention-days: 30
85+
7886
docker-test:
7987
needs: [hadolint, frontend]
8088
runs-on: ubuntu-latest

spec/spec_helper.rb

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,26 @@
1212
add_filter '/config/'
1313

1414
track_files '**/*.rb'
15+
16+
# Display more detailed output
17+
minimum_coverage 80
18+
maximum_coverage_drop 5
19+
20+
# Show detailed coverage info
21+
add_group 'App', 'app'
22+
add_group 'Routes', 'app'
23+
24+
# Print coverage summary at the end
25+
at_exit do
26+
puts "\n" + ('=' * 50)
27+
puts 'COVERAGE SUMMARY'
28+
puts '=' * 50
29+
puts "Total Coverage: #{SimpleCov.result.covered_percent.round(2)}%"
30+
puts "Lines Covered: #{SimpleCov.result.covered_lines}"
31+
puts "Lines Missed: #{SimpleCov.result.missed_lines}"
32+
puts "Total Lines: #{SimpleCov.result.total_lines}"
33+
puts '=' * 50
34+
end
1535
end
1636
end
1737

0 commit comments

Comments
 (0)