Skip to content

chore: Update CI/CD to use codecov action and cobertura reports #25

chore: Update CI/CD to use codecov action and cobertura reports

chore: Update CI/CD to use codecov action and cobertura reports #25

Workflow file for this run

name: test
on: [push]
jobs:
test:
name: Ruby ${{ matrix.ruby }} / ${{ matrix.gemfile }}
runs-on: ubuntu-22.04
strategy:
matrix:
ruby:
- "3.2"
- "3.1"
- "3.0"
- "2.7"
gemfile:
- rails_5.2.gemfile
- rails_6.0.gemfile
- rails_6.1.gemfile
- rails_7.0.gemfile
exclude:
- ruby: "3.2"
gemfile: rails_5.2.gemfile
- ruby: "3.2"
gemfile: rails_6.0.gemfile
- ruby: "3.1"
gemfile: rails_5.2.gemfile
- ruby: "3.1"
gemfile: rails_6.0.gemfile
- ruby: "3.0"
gemfile: rails_5.2.gemfile
fail-fast: False
services:
rabbitmq:
image: rabbitmq:latest
options: >-
--health-cmd "rabbitmqctl node_health_check"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5672:5672
env:
AMQP_SERVER: amqp://localhost:5672
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}
BUNDLE_JOBS: 4
BUNDLE_RETRY: 10
BUNDLE_WITHOUT: development
steps:
- uses: actions/checkout@master
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: True
- name: Run unit tests
run: bundle exec rspec -Ispec/unit --color spec/unit
- name: Run integration tests
run: bundle exec rspec -Ispec/integration --color spec/integration
- uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
rubocop:
name: rubocop
runs-on: ubuntu-22.04
env:
BUNDLE_JOBS: 4
BUNDLE_RETRY: 10
BUNDLE_WITHOUT: development
steps:
- uses: actions/checkout@master
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
bundler-cache: true
- name: Run rubocop
run: bundle exec rubocop --parallel --color