.github/workflows/ruby.yml
name: Ruby
on:
push:
branches:
- master
pull_request:
jobs:
build:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }}
strategy:
matrix:
ruby:
- '3.1.3'
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0.0
- name: Install dependencies
run: |
gem install bundler -v 2.2.3
bundle install
- 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 the default task
env:
CC_TEST_REPORTER_ID: 4bb114295e4e80ad0f42b2f30b7611f0459c1cbdc7a74a0fe6fa437a543796d9
run: bundle exec rake
- name: Publish code coverage
run: |
export GIT_BRANCH="master"
pwd
ls -l coverage
./cc-test-reporter after-build -d -t simplecov -r 4bb114295e4e80ad0f42b2f30b7611f0459c1cbdc7a74a0fe6fa437a543796d9