Skip to content
Closed
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
16 changes: 11 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,23 @@ jobs:
specs:
strategy:
matrix:
ruby-version: ['2.7', '3.0', '3.1']
ruby-version: ['3.0', '3.1']

runs-on: ubuntu-latest
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- run: bundle exec rake
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
- name: Add coverage to job summary
if: always() && hashFiles('coverage/.last_run.json') != ''
run: |
echo "Line coverage (Ruby ${{ matrix.ruby-version }}): $(jq -r '.result.line' coverage/.last_run.json)%" >> "$GITHUB_STEP_SUMMARY"
- name: Upload coverage report
if: always() && hashFiles('coverage/index.html') != ''
uses: actions/upload-artifact@v4
with:
name: coverage-ruby-${{ matrix.ruby-version }}
path: coverage/
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Style/ClassAndModuleChildren:

AllCops:
NewCops: disable # TODO: enable
TargetRubyVersion: 2.7
TargetRubyVersion: 3.0
Exclude:
- bin/*
- "*.gemspec"
Expand Down
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ source "https://rubygems.org"
gemspec

gem 'simplecov', require: false, group: :test
gem 'codecov', require: false, group: :test
3 changes: 0 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ GEM
attr_extras (6.2.5)
builder (3.2.4)
byebug (11.1.3)
codecov (0.6.0)
simplecov (>= 0.15, < 0.22)
coderay (1.1.3)
concurrent-ruby (1.1.10)
crass (1.0.6)
Expand Down Expand Up @@ -211,7 +209,6 @@ PLATFORMS
x86_64-linux

DEPENDENCIES
codecov
factory_bot
graphql_to_rest!
pry-byebug
Expand Down
7 changes: 2 additions & 5 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@
if ENV['COVERAGE'] || ENV['CI']
require 'simplecov'

if ENV['CI']
require 'codecov'
SimpleCov.formatter = SimpleCov::Formatter::Codecov
SimpleCov.start do
minimum_coverage 98 if ENV['CI']
end

SimpleCov.start
end

require 'graphql_to_rest'
Expand Down
Loading