.github/workflows/ci.yml
name: CI (Tests)
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1.4'
- name: Prepare overage tools
shell: bash
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: Install dependencies
run: bundle install
- name: run tests suite
run: |
export CC_TEST_REPORTER_ID="${{ secrets.CC_TEST_REPORTER_ID }}"
rspec
./cc-test-reporter format-coverage --input-type cobertura ./coverage/coverage.xml
if [[ "$?" == 0 ]]; then ./cc-test-reporter upload-coverage; fi