Skip to content

Commit

Permalink
Use Coveralls GitHub Action (#2266)
Browse files Browse the repository at this point in the history
* Use Coveralls GitHub Action

* Update CHANGELOG
  • Loading branch information
duffn authored Jun 15, 2022
1 parent 7ee07d1 commit f5dc7dc
Show file tree
Hide file tree
Showing 17 changed files with 69 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .coveralls.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
service_name: github-actions
service_name: github
18 changes: 17 additions & 1 deletion .github/workflows/edge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:
continue-on-error: true
env:
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}

steps:
- uses: actions/checkout@v2
Expand All @@ -34,3 +33,20 @@ jobs:

- name: Run tests
run: bundle exec rake spec

- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: run-${{ matrix.ruby }}-${{ matrix.gemfile }}
parallel: true

finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
18 changes: 17 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ jobs:
runs-on: ubuntu-20.04
env:
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}

steps:
- uses: actions/checkout@v2
Expand All @@ -84,3 +83,20 @@ jobs:
- name: Run tests (spec/integration/multi_xml)
if: ${{ matrix.gemfile == 'gemfiles/multi_xml.gemfile' }}
run: bundle exec rspec spec/integration/multi_xml

- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: run-${{ matrix.ruby }}-${{ matrix.gemfile }}
parallel: true

finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* [#2244](/~https://github.com/ruby-grape/grape/pull/2244): Fix a breaking change in `Grape::Validations` provided in 1.6.1 - [@dm1try](/~https://github.com/dm1try).
* [#2250](/~https://github.com/ruby-grape/grape/pull/2250): Add deprecation warning for `UnsupportedGroupTypeError` and `MissingGroupTypeError` - [@ericproulx](/~https://github.com/ericproulx).
* [#2256](/~https://github.com/ruby-grape/grape/pull/2256): Raise `Grape::Exceptions::MultipartPartLimitError` from Rack when too many files are uploaded - [@bschmeck](/~https://github.com/bschmeck).
* [#2264](/~https://github.com/ruby-grape/grape/pull/2264): Fix coveralls code coverage - [@duffn](/~https://github.com/duffn).
* [#2266](/~https://github.com/ruby-grape/grape/pull/2266): Fix code coverage - [@duffn](/~https://github.com/duffn).
* Your contribution here.

### 1.6.2 (2021/12/30)
Expand Down
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@ end

group :test do
gem 'cookiejar'
gem 'coveralls_reborn'
gem 'grape-entity', '~> 0.6'
gem 'maruku'
gem 'mime-types'
gem 'rack-jsonp', require: 'rack/jsonp'
gem 'rack-test', '~> 1.1.0'
gem 'rspec', '~> 3.11.0'
gem 'ruby-grape-danger', '~> 0.2.0', require: false
gem 'simplecov', '~> 0.21.2'
gem 'simplecov-lcov', '~> 0.8.0'
gem 'test-prof', require: false
end

Expand Down
3 changes: 2 additions & 1 deletion gemfiles/multi_json.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@ end

group :test do
gem 'cookiejar'
gem 'coveralls_reborn'
gem 'grape-entity', '~> 0.6'
gem 'maruku'
gem 'mime-types'
gem 'rack-jsonp', require: 'rack/jsonp'
gem 'rack-test', '~> 1.1.0'
gem 'rspec', '~> 3.11.0'
gem 'ruby-grape-danger', '~> 0.2.0', require: false
gem 'simplecov', '~> 0.21.2'
gem 'simplecov-lcov', '~> 0.8.0'
gem 'test-prof', require: false
end

Expand Down
3 changes: 2 additions & 1 deletion gemfiles/multi_xml.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@ end

group :test do
gem 'cookiejar'
gem 'coveralls_reborn'
gem 'grape-entity', '~> 0.6'
gem 'maruku'
gem 'mime-types'
gem 'rack-jsonp', require: 'rack/jsonp'
gem 'rack-test', '~> 1.1.0'
gem 'rspec', '~> 3.11.0'
gem 'ruby-grape-danger', '~> 0.2.0', require: false
gem 'simplecov', '~> 0.21.2'
gem 'simplecov-lcov', '~> 0.8.0'
gem 'test-prof', require: false
end

Expand Down
3 changes: 2 additions & 1 deletion gemfiles/rack1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@ end

group :test do
gem 'cookiejar'
gem 'coveralls_reborn'
gem 'grape-entity', '~> 0.6'
gem 'maruku'
gem 'mime-types'
gem 'rack-jsonp', require: 'rack/jsonp'
gem 'rack-test', '~> 1.1.0'
gem 'rspec', '~> 3.11.0'
gem 'ruby-grape-danger', '~> 0.2.0', require: false
gem 'simplecov', '~> 0.21.2'
gem 'simplecov-lcov', '~> 0.8.0'
gem 'test-prof', require: false
end

Expand Down
3 changes: 2 additions & 1 deletion gemfiles/rack2.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@ end

group :test do
gem 'cookiejar'
gem 'coveralls_reborn'
gem 'grape-entity', '~> 0.6'
gem 'maruku'
gem 'mime-types'
gem 'rack-jsonp', require: 'rack/jsonp'
gem 'rack-test', '~> 1.1.0'
gem 'rspec', '~> 3.11.0'
gem 'ruby-grape-danger', '~> 0.2.0', require: false
gem 'simplecov', '~> 0.21.2'
gem 'simplecov-lcov', '~> 0.8.0'
gem 'test-prof', require: false
end

Expand Down
3 changes: 2 additions & 1 deletion gemfiles/rack2_2.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@ end

group :test do
gem 'cookiejar'
gem 'coveralls_reborn'
gem 'grape-entity', '~> 0.6'
gem 'maruku'
gem 'mime-types'
gem 'rack-jsonp', require: 'rack/jsonp'
gem 'rack-test', '~> 1.1.0'
gem 'rspec', '~> 3.11.0'
gem 'ruby-grape-danger', '~> 0.2.0', require: false
gem 'simplecov', '~> 0.21.2'
gem 'simplecov-lcov', '~> 0.8.0'
gem 'test-prof', require: false
end

Expand Down
3 changes: 2 additions & 1 deletion gemfiles/rack_edge.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@ end

group :test do
gem 'cookiejar'
gem 'coveralls_reborn'
gem 'grape-entity', '~> 0.6'
gem 'maruku'
gem 'mime-types'
gem 'rack-jsonp', require: 'rack/jsonp'
gem 'rack-test', '~> 1.1.0'
gem 'rspec', '~> 3.11.0'
gem 'ruby-grape-danger', '~> 0.2.0', require: false
gem 'simplecov', '~> 0.21.2'
gem 'simplecov-lcov', '~> 0.8.0'
gem 'test-prof', require: false
end

Expand Down
3 changes: 2 additions & 1 deletion gemfiles/rails_5.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@ end

group :test do
gem 'cookiejar'
gem 'coveralls_reborn'
gem 'grape-entity', '~> 0.6'
gem 'maruku'
gem 'mime-types'
gem 'rack-jsonp', require: 'rack/jsonp'
gem 'rack-test', '~> 1.1.0'
gem 'rspec', '~> 3.11.0'
gem 'ruby-grape-danger', '~> 0.2.0', require: false
gem 'simplecov', '~> 0.21.2'
gem 'simplecov-lcov', '~> 0.8.0'
gem 'test-prof', require: false
end

Expand Down
3 changes: 2 additions & 1 deletion gemfiles/rails_6.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@ end

group :test do
gem 'cookiejar'
gem 'coveralls_reborn'
gem 'grape-entity', '~> 0.6'
gem 'maruku'
gem 'mime-types'
gem 'rack-jsonp', require: 'rack/jsonp'
gem 'rack-test', '~> 1.1.0'
gem 'rspec', '~> 3.11.0'
gem 'ruby-grape-danger', '~> 0.2.0', require: false
gem 'simplecov', '~> 0.21.2'
gem 'simplecov-lcov', '~> 0.8.0'
gem 'test-prof', require: false
end

Expand Down
3 changes: 2 additions & 1 deletion gemfiles/rails_6_1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@ end

group :test do
gem 'cookiejar'
gem 'coveralls_reborn'
gem 'grape-entity', '~> 0.6'
gem 'maruku'
gem 'mime-types'
gem 'rack-jsonp', require: 'rack/jsonp'
gem 'rack-test', '~> 1.1.0'
gem 'rspec', '~> 3.11.0'
gem 'ruby-grape-danger', '~> 0.2.0', require: false
gem 'simplecov', '~> 0.21.2'
gem 'simplecov-lcov', '~> 0.8.0'
gem 'test-prof', require: false
end

Expand Down
3 changes: 2 additions & 1 deletion gemfiles/rails_7.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@ end

group :test do
gem 'cookiejar'
gem 'coveralls_reborn'
gem 'grape-entity', '~> 0.6'
gem 'maruku'
gem 'mime-types'
gem 'rack-jsonp', require: 'rack/jsonp'
gem 'rack-test', '~> 1.1.0'
gem 'rspec', '~> 3.11.0'
gem 'ruby-grape-danger', '~> 0.2.0', require: false
gem 'simplecov', '~> 0.21.2'
gem 'simplecov-lcov', '~> 0.8.0'
gem 'test-prof', require: false
end

Expand Down
3 changes: 2 additions & 1 deletion gemfiles/rails_edge.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@ end

group :test do
gem 'cookiejar'
gem 'coveralls_reborn'
gem 'grape-entity', '~> 0.6'
gem 'maruku'
gem 'mime-types'
gem 'rack-jsonp', require: 'rack/jsonp'
gem 'rack-test', '~> 1.1.0'
gem 'rspec', '~> 3.11.0'
gem 'ruby-grape-danger', '~> 0.2.0', require: false
gem 'simplecov', '~> 0.21.2'
gem 'simplecov-lcov', '~> 0.8.0'
gem 'test-prof', require: false
end

Expand Down
11 changes: 9 additions & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,12 @@ def rollback_transaction; end
config.example_status_persistence_file_path = '.rspec_status'
end

require 'coveralls'
Coveralls.wear!
require 'simplecov'
require 'simplecov-lcov'
SimpleCov::Formatter::LcovFormatter.config do |c|
c.report_with_single_file = true
c.single_report_path = 'coverage/lcov.info'
end

SimpleCov.formatter = SimpleCov::Formatter::LcovFormatter
SimpleCov.start

0 comments on commit f5dc7dc

Please sign in to comment.