Ensure one-to-one field reverse relations are cached in the targeted … #1246
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Specs | |
on: | |
push: | |
branches: "*" | |
pull_request: | |
branches: "*" | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
mysql: | |
runs-on: ubuntu-latest | |
services: | |
mysql: | |
image: mysql:5.7 | |
env: | |
MYSQL_ROOT_PASSWORD: "mysql" | |
MYSQL_DATABASE: marten_test | |
ports: | |
- 3307:3306 | |
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
continue-on-error: ${{ matrix.crystal == 'nightly' }} | |
strategy: | |
fail-fast: false | |
matrix: | |
crystal: [ | |
'1.7.3', | |
'1.8.2', | |
'1.9.2', | |
'nightly', | |
] | |
container: | |
image: crystallang/crystal:${{ matrix.crystal }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install packages required for MySQL | |
run: | | |
apt-get update | |
apt-get -yqq install mysql-client libmysqlclient-dev | |
- name: Create additional DB for MySQL | |
run: | | |
mysql -u root -h mysql --password=mysql -e 'create database marten_other_test;' | |
env: | |
PGPASSWORD: mysql | |
- name: Install shards | |
run: shards install --ignore-crystal-version --skip-postinstall --skip-executables | |
- name: Setup env JSON file | |
run: cp .spec.env.json.ci .spec.env.json | |
- name: Run tests | |
run: scripts/run_batched_specs | |
env: | |
MARTEN_SPEC_DB_CONNECTION: mysql | |
postgresql: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:${{ matrix.db_version }} | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: marten_test | |
ports: | |
- 5432:5432 | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
continue-on-error: ${{ matrix.crystal == 'nightly' }} | |
strategy: | |
fail-fast: false | |
matrix: | |
db_version: ['12', '13', '14', '15', 'latest'] | |
crystal: [ | |
'1.7.3', | |
'1.8.2', | |
'1.9.2', | |
'nightly', | |
] | |
container: | |
image: crystallang/crystal:${{ matrix.crystal }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install packages required for PostgreSQL | |
run: | | |
apt-get update | |
apt-get -yqq install libpq-dev postgresql-client libsqlite3-dev | |
- name: Create additional DB for PostgreSQL | |
run: | | |
createdb marten_other_test -h postgres -U postgres | |
env: | |
PGPASSWORD: postgres | |
- name: Install shards | |
run: shards install --ignore-crystal-version --skip-postinstall --skip-executables | |
- name: Setup env JSON file | |
run: cp .spec.env.json.ci .spec.env.json | |
- name: Run tests | |
run: scripts/run_batched_specs | |
env: | |
MARTEN_SPEC_DB_CONNECTION: postgresql | |
sqlite: | |
runs-on: ubuntu-latest | |
continue-on-error: ${{ matrix.crystal == 'nightly' }} | |
strategy: | |
fail-fast: false | |
matrix: | |
crystal: [ | |
'1.7.3', | |
'1.8.2', | |
'1.9.2', | |
'nightly', | |
] | |
container: | |
image: crystallang/crystal:${{ matrix.crystal }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install packages required for SQLite | |
run: | | |
apt-get update | |
apt-get -yqq install libsqlite3-dev | |
- name: Install shards | |
run: shards install --ignore-crystal-version --skip-postinstall --skip-executables | |
- name: Setup env JSON file | |
run: cp .spec.env.json.ci .spec.env.json | |
- name: Run tests | |
run: scripts/run_batched_specs |