Skip to content

Commit

Permalink
Include coverage in spec matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
marcandre committed Jun 16, 2020
1 parent 0a9c2b8 commit 5906d61
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# CAUTION: There's probably a way to refactor this nicely. PR welcome.
# NOTE: When changing minimal version of Ruby or Rubocop, change all of them

name: CI
Expand All @@ -7,7 +8,7 @@ on: [push, pull_request]
jobs:
ast_specs:
name: >-
AST | ${{ matrix.rubocop }} | ${{ matrix.ruby }} (${{ matrix.os }})
${{ matrix.title || 'AST' }} | ${{ matrix.rubocop }} | ${{ matrix.ruby }} (${{ matrix.os }})
runs-on: ${{ matrix.os }}-latest
env:
# See https://github.com/tmm1/test-queue#environment-variables
Expand All @@ -18,10 +19,13 @@ jobs:
os: [ ubuntu ]
ruby: [ 2.4, 2.5, 2.6, 2.7, head ]
rubocop: [ master ]
coverage: [ null ]
title: [ null ]
include:
- { os: windows, rubocop: master, ruby: mingw }
- { rubocop: '0.84.0', ruby: 2.4, os: ubuntu }
- { rubocop: '0.84.0', ruby: head, os: ubuntu }
- { rubocop: '0.84.0', ruby: 2.4, os: ubuntu, coverage: true, title: 'Cov' }

steps:
- name: windows misc
Expand Down Expand Up @@ -49,10 +53,20 @@ jobs:
git clone https://github.com/rubocop-hq/rubocop.git ../rubocop
chmod +x ../rubocop/exe/rubocop
cd ../rubocop && bundle install --jobs 3 --retry 3
- name: code coverage
if: matrix.coverage
uses: paambaati/codeclimate-action@v2.6.0
env:
CC_TEST_REPORTER_ID: '758a8228862932dc8afa9144c4a5bc5dfe29c2f7dde1b7734175bad49ee310e7'
COVERAGE: 'true'
with:
coverageCommand: bundle exec rake spec
debug: true
- name: spec
if: matrix.coverage != true
run: bundle exec rake spec
- name: internal_investigation
if: matrix.os != 'windows'
if: "matrix.os != 'windows' && matrix.coverage != true"
run: bundle exec rake internal_investigation
rubocop_specs:
name: >-
Expand Down

0 comments on commit 5906d61

Please sign in to comment.