Skip to content

[~] bump version

[~] bump version #285

Workflow file for this run

name: verify
on: [pull_request]
env:
DB_USERNAME: runner
DB_PASSWORD: password
jobs:
rspec:
name: rspec
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
ruby: ["3.2.5", "3.3.5", truffleruby]
db: ["mariadb", "mysql", "pg"]
runs-on: ${{ matrix.os }}
services:
redis:
image: redis:7.4-alpine
ports:
- '6379:6379'
postgres:
image: postgres:16
env:
POSTGRES_USER: ${{ env.DB_USERNAME }}
POSTGRES_PASSWORD: ${{ env.DB_PASSWORD }}
ports:
- '5432:5432'
mysql:
image: bitnami/mysql:latest
env:
MYSQL_ROOT_USER: ${{ env.DB_USERNAME }}
MYSQL_ROOT_PASSWORD: ${{ env.DB_PASSWORD }}
ports:
- '3306:3306'
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=5
mariadb:
image: mariadb:latest
env:
MARIADB_ROOT_PASSWORD: ${{ env.DB_PASSWORD }}
MYSQL_USER: ${{ env.DB_USERNAME }}
MYSQL_PASSWORD: ${{ env.DB_PASSWORD }}
ports:
- '3307:3306'
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Setup test database
env:
RAILS_ENV: test
DB_USERNAME: ${{ env.DB_USERNAME }}
DB_PASSWORD: ${{ env.DB_PASSWORD }}
run: |
bin/rails db:prepare
- name: Run tests
env:
RAILS_ENV: test
DB_ROLE: ${{ matrix.db }}
DB_USERNAME: ${{ env.DB_USERNAME }}
DB_PASSWORD: ${{ env.DB_PASSWORD }}
run: |
bin/test
- name: Upload coverage
if: ${{ matrix.db == 'pg' && matrix.ruby == '3.2.5' }}
uses: actions/upload-artifact@v4
with:
name: review.txt
path: coverage/review.txt
coverage:
name: coverage
needs: rspec
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: review.txt
path: coverage/
- uses: reviewdog/action-setup@v1
with:
reviewdog_version: latest # Optional. [latest,nightly,v.X.Y.Z]
- name: coverage
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
reviewdog -reporter=github-pr-review -runners=coverage