.github/workflows/ruby.yml
name: Ruby Tests on Github Actions
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version:
- 2.5
- 2.6
- 2.7
- '3.0'
- 3.1
- 3.2
- head
steps:
- name: ๐ Checkout Code
uses: actions/checkout@v3
- name: ๐ Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: ๐งช Run tests
run: bundle exec rake
- name: ๐ Coveralls
uses: coverallsapp/github-action@1.1.3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: ๐ Push coverage to Code Climate
uses: paambaati/codeclimate-action@v3.2.0
env:
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}