Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,15 @@ jobs:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bundle exec standardrb
- run: COVERAGE=0 TEST_NODE_PARITY=1 bundle exec rake test
- name: Run tests with coverage
env:
COVERAGE: 1
TEST_NODE_PARITY: 1
Comment on lines +34 to +37
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would make sense to only run with enabled coverage and node parity for Ruby 3.3, to save some worker time.

run: bundle exec rake test
- name: Upload coverage to Codecov
if: matrix.ruby == 3.3
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/coverage.json
fail_ci_if_error: true
5 changes: 5 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
source "https://rubygems.org"

gem "rake"
gem "minitest"
gem "simplecov"
gem "simplecov-cobertura"

gemspec
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![Build Status](https://github.com/transloadit/ruby-sdk/actions/workflows/ci.yml/badge.svg)](https://github.com/transloadit/ruby-sdk/actions/workflows/ci.yml)
[![Code Climate](https://codeclimate.com/github/transloadit/ruby-sdk.png)](https://codeclimate.com/github/transloadit/ruby-sdk)
[![Coverage](https://codecov.io/gh/transloadit/ruby-sdk/branch/main/graph/badge.svg)](https://codecov.io/gh/transloadit/ruby-sdk)

# Transloadit Ruby SDK

Expand Down
8 changes: 7 additions & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@

if ENV["COVERAGE"] != "0"
require "simplecov"
SimpleCov.start { add_filter "/test/" }
SimpleCov.start do
add_filter "/test/"
enable_coverage :branch
end

require "simplecov-cobertura"
SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter
end

require "minitest/autorun"
Expand Down
Loading