Skip to content

Ruby

Ruby #80

Workflow file for this run

name: Ruby
on:
push:
branches:
- master
pull_request:
schedule:
- cron: 0 0 * * 0
workflow_dispatch:
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
permissions:
contents: read
jobs:
test:
services:
postgres:
image: postgres:13
env:
POSTGRES_PASSWORD: password
POSTGRES_DB: arel_attribute_test
ports:
- "5432:5432"
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
mysql:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: arel_attribute_test
ports:
- "3306:3306"
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
runs-on: ubuntu-latest
name: "${{ matrix.gemfile }} / Ruby ${{ matrix.ruby }}"
strategy:
fail-fast: false
matrix:
ruby: ["3.3", "3.4"]
gemfile:
- gemfile_81
include:
- ruby: "3.3"
gemfile: gemfile_72
- ruby: "3.3"
gemfile: gemfile_80
- ruby: "head"
gemfile: rails_edge
env:
PGHOST: 127.0.0.1
PGPORT: 5432
PGUSER: postgres
PGPASSWORD: password
MYSQL_HOST: 127.0.0.1
MYSQL_PWD: password
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
steps:
- uses: actions/checkout@v6
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: run sqlite tests
env:
DB: sqlite3
run: bundle exec rake spec
- name: run pg tests
env:
DB: pg
run: bundle exec rake db:create spec
- name: run mysql tests
env:
DB: mysql2
run: bundle exec rake db:create spec
brakeman:
runs-on: ubuntu-latest
name: brakeman
steps:
- uses: actions/checkout@v6
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
bundler-cache: true
- name: run brakeman
run: bundle exec rake brakeman