Skip to content

Commit 60a5c3e

Browse files
committed
Merge coverage results
parser and prism will differ in what they do, so merge them together
1 parent 160d5ca commit 60a5c3e

File tree

2 files changed

+28
-4
lines changed

2 files changed

+28
-4
lines changed

.github/workflows/main.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,20 +47,34 @@ jobs:
4747
with:
4848
ruby-version: "${{ matrix.ruby }}"
4949
bundler-cache: true
50-
- run: NO_COVERAGE=true bundle exec rake spec
50+
- run: bundle exec rake spec
5151
env:
5252
PARSER_ENGINE: ${{ matrix.parser_engine }}
53+
- name: Upload Coverage Artifact
54+
uses: actions/upload-artifact@v4
55+
with:
56+
name: coverage-ubuntu-${{ matrix.ruby }}-${{ matrix.parser_engine }}
57+
path: coverage/.resultset.json
58+
if-no-files-found: error
59+
include-hidden-files: true
5360

5461
coverage:
62+
name: Check Coverage
63+
needs: main
5564
runs-on: ubuntu-latest
56-
name: "Test coverage"
65+
5766
steps:
5867
- uses: actions/checkout@v4
68+
- uses: actions/download-artifact@v4
69+
name: Download Coverage Artifacts
70+
with:
71+
pattern: coverage-*
5972
- uses: ruby/setup-ruby@v1
6073
with:
61-
ruby-version: "3.4"
74+
ruby-version: ruby # Latest stable CRuby version
6275
bundler-cache: true
63-
- run: bundle exec rake spec
76+
77+
- run: bundle exec rake coverage:ci
6478

6579
edge-rubocop:
6680
runs-on: ubuntu-latest

tasks/coverage.rake

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# frozen_string_literal: true
2+
3+
namespace :coverage do
4+
desc 'Report Coverage from merged CI runs'
5+
task :ci do
6+
require 'simplecov'
7+
8+
SimpleCov.collate Dir['coverage-*/.resultset.json']
9+
end
10+
end

0 commit comments

Comments
 (0)