Skip to content

Move CI to GHA; update supported Ruby, ddtrace, Redis versions [DEM-331] #54

Move CI to GHA; update supported Ruby, ddtrace, Redis versions [DEM-331]

Move CI to GHA; update supported Ruby, ddtrace, Redis versions [DEM-331] #54

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
env:
app: sidekiq_publisher
jobs:
lint:
name: Lint (Ruby ${{ matrix.ruby }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: [ '3.0', '3.1', '3.2' ]
steps:
- name: Checkout the code
uses: actions/checkout@v3
- name: Install Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run Rubocop
run: bundle exec rubocop
test:
name: Test (Ruby ${{ matrix.ruby }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: [ '3.0', '3.1', '3.2' ]
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/sidekiq_publisher_test
PGHOST: 127.0.0.1
PGUSER: postgres
REDIS_URL: redis://localhost:6379
RAILS_ENV: test
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
POSTGRES_DB: sidekiq_publisher_test
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- 5432:5432
redis:
image: redis:latest
ports:
- 6379:6379
steps:
- name: Checkout the code
uses: actions/checkout@v3
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run Rspec
run: |
bundle exec appraisal install
bundle exec appraisal rspec