Skip to content

Preserve readonly and strict_loading status on cast #137

Preserve readonly and strict_loading status on cast

Preserve readonly and strict_loading status on cast #137

Workflow file for this run

name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test_sqlite:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
include:
- ruby: "2.5.5"
gemfile: Gemfile.5.2.sqlite3
- ruby: "2.7.7"
gemfile: Gemfile.5.2.sqlite3
- ruby: "3.0.5"
gemfile: Gemfile.6.0.sqlite3
- ruby: "3.0.5"
gemfile: Gemfile.6.1.sqlite3
- ruby: "3.0.5"
gemfile: Gemfile.7.0.sqlite3
- ruby: "3.1.3"
gemfile: Gemfile.7.0.sqlite3
- ruby: "3.2.0"
gemfile: Gemfile.7.0.sqlite3
env:
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
steps:
- uses: actions/checkout@v3
- name: Install ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run tests
run: bundle exec rake spec
test_mysql:
runs-on: ubuntu-20.04
services:
mysql:
image: mysql:5.6
env:
MYSQL_ROOT_PASSWORD: password
ports:
- 3306:3306
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
strategy:
fail-fast: false
matrix:
include:
- ruby: "2.7.7"
gemfile: Gemfile.5.2.mysql2
env:
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
steps:
- uses: actions/checkout@v3
- name: Install ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Setup databases
run: |
mysql -e 'create database IF NOT EXISTS active_type_test;' -u root --password=password -P 3306 -h 127.0.0.1
- name: Run tests
run: bundle exec rake spec
test_pg:
runs-on: ubuntu-20.04
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
strategy:
fail-fast: false
matrix:
include:
- ruby: "2.5.5"
gemfile: Gemfile.5.2.pg
- ruby: "2.7.7"
gemfile: Gemfile.5.2.pg
- ruby: "3.0.5"
gemfile: Gemfile.6.1.pg
- ruby: "3.0.5"
gemfile: Gemfile.7.0.pg
- ruby: "3.1.3"
gemfile: Gemfile.7.0.pg
- ruby: "3.2.0"
gemfile: Gemfile.7.0.pg
env:
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
steps:
- uses: actions/checkout@v3
- name: Install database client
run: |
sudo apt-get install -y postgresql-client
- name: Install ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Setup databases
run: |
PGPASSWORD=postgres psql -c 'create database active_type_test;' -U postgres -p 5432 -h localhost
- name: Run tests
run: bundle exec rake spec