diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f8e27b3..48dab95 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,26 +9,27 @@ defaults: jobs: specs: - name: 'run-specs' - # skip on [ci skip] and do not run 2 on push and interal PR + name: 'specs' + # skip on [ci skip] and do not run 2 on push and internal PR if: (contains(github.event.commits[0].message, '[ci skip]') == false) && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository) continue-on-error: ${{ matrix.allow_failure || false }} runs-on: ubuntu-latest - steps: - uses: actions/checkout@v2 - uses: ruby/setup-ruby@v1 with: ruby-version: 3.1.0 bundler-cache: true - - - name: run specs + - name: Setup Code Climate test-reporter + run: | + curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter + chmod +x ./cc-test-reporter + ./cc-test-reporter before-build + - name: Run specs run: | bundle exec rake - - # needs the right code climate reporter id - # - name: Test & publish code coverage - # uses: paambaati/codeclimate-action@v3.0.0 - # env: - # CC_TEST_REPORTER_ID: + - name: Publish code coverage + run: | + export GIT_BRANCH="${GITHUB_REF/refs\/heads\//}" + ./cc-test-reporter after-build -r ${{secrets.CC_TEST_REPORTER_ID}} diff --git a/Gemfile b/Gemfile index d00a0e0..8d31db1 100644 --- a/Gemfile +++ b/Gemfile @@ -15,6 +15,6 @@ gem "rubocop-rails", require: false group :test do gem "rspec" - gem "simplecov" + gem "simplecov", "< 0.18" gem "sqlite3" end