Skip to content

Commit

Permalink
Add coverage report
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuscruz committed Nov 30, 2024
1 parent ad1c7c0 commit dce4064
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 8 deletions.
50 changes: 44 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ jobs:
- 3.2.5
- 3.3.5
rails:
- '~> 7.0.0'
- '~> 7.1.0'
- '~> 8.0.0'
- 7.0.0
- 7.1.0
- 8.0.0
include:
- ruby: 3.1.6
rails: '~> 7.0.0'
rails: 7.0.0
- ruby: 3.1.6
rails: '~> 7.1.0'
rails: 7.1.0

name: Ruby ${{ matrix.ruby }} / ActiveRecord ${{ matrix.rails }}
services:
postgres_primary:
Expand Down Expand Up @@ -178,3 +178,41 @@ jobs:
PG_REPLICA_PORT: 5433

run: bundle exec rspec --format progress

- name: Upload Coverage Report
uses: actions/upload-artifact@v4
with:
name: ${{ env.RUN_UNIQUE_ID }}_artifact_${{ matrix.ruby }}_${{ matrix.rails }}
path: coverage/
include-hidden-files: true
if-no-files-found: error

coverage_report:
needs: [rspec]
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.5

- name: Install Dependencies
run: |
gem install bundler
bundle install
- name: Download Partial Coverage Resultsets
uses: actions/download-artifact@v4
with:
path: coverage/

- name: Collate Partial Coverage Resultsets
run: bundle exec rake coverage:report

- uses: joshmfrankel/simplecov-check-action@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ group :test do
end

if ENV["RAILS_VERSION"]
gem "activerecord", ENV["RAILS_VERSION"]
gem "activesupport", ENV["RAILS_VERSION"]
gem "activerecord", "~> #{ENV["RAILS_VERSION"]}"
gem "activesupport", "~> #{ENV["RAILS_VERSION"]}"
end

# Specify your gem's dependencies in active_record_proxy_adapters.gemspec
Expand Down

0 comments on commit dce4064

Please sign in to comment.