.github/workflows/coverage.yaml
---
name: Coverage
on:
push:
branches:
- master
jobs:
coverage_checks:
runs-on: ubuntu-18.04
name: coverage
steps:
- name: Checkout current PR
uses: actions/checkout@v2
- 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: Generate coverage
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
- run: bundle install --jobs 3 --retry 3
- run: bundle exec rake spec
- name: Publish code coverage
run: |
export GIT_BRANCH="${GITHUB_REF/refs\/heads\//}"
./cc-test-reporter after-build -r ${{secrets.CC_TEST_REPORTER_ID}}