.github/workflows/test.yml
name: Test
on:
push:
branches:
- master
jobs:
test:
name: "Run Tests"
runs-on: ubuntu-latest
services:
redis:
image: redis
ports:
- 6379:6379
options: --entrypoint redis-server
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2.2'
- name: Install Bundler
run: gem install bundler:2.4.13
- name: Install Dependencies
run: bundle install
- name: Run tests
run: bundle exec rspec
- name: Publish code coverage
uses: paambaati/codeclimate-action@v4.0.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
debug: true
coverageLocations: ${{github.workspace}}/coverage/coverage.json:simplecov