Skip to content

Commit

Permalink
Merge pull request #3191 from rubygems/simplify-cc
Browse files Browse the repository at this point in the history
Use CC GitHub Action at CI.
  • Loading branch information
sonalkr132 authored Aug 23, 2022
2 parents fbd9883 + 56bde33 commit 1ce102d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 61 deletions.
51 changes: 0 additions & 51 deletions .github/workflows/codeclimate.yml

This file was deleted.

15 changes: 5 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ jobs:
runs-on: ubuntu-18.04
env:
RUBYGEMS_VERSION: ${{ matrix.rubygems_version }}
# If we don't supply a CC_TEST_REPORTER_ID simplecov won't output coverage in a way that
# code climate understands
CC_TEST_REPORTER_ID: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
# Fail hard when Toxiproxy is not running to ensure all tests (even Toxiproxy optional ones) are passing
REQUIRE_TOXIPROXY: true
steps:
Expand Down Expand Up @@ -50,10 +47,8 @@ jobs:
bundle exec rake db:setup
- name: Tests
run: bin/rails test
- name: archive coverage
if: matrix.rubygems_version == '3.3.11'
uses: actions/upload-artifact@v3
with:
name: coverage
path: |
coverage
- name: Publish code coverage
if: matrix.rubygems_version == '3.3.11' && (success() || failure())
uses: paambaati/codeclimate-action@v3.0.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
5 changes: 5 additions & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
SimpleCov.start "rails" do
add_filter "lib/tasks"
add_filter "lib/lograge"

if ENV["CI"]
require "simplecov_json_formatter"
formatter SimpleCov::Formatter::JSONFormatter
end
end

ENV["RAILS_ENV"] ||= "test"
Expand Down

0 comments on commit 1ce102d

Please sign in to comment.