add trilogy adapter #251
Workflow file for this run
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: Test | |
on: [push, pull_request] | |
jobs: | |
test: | |
services: | |
postgres: | |
image: postgis/postgis:10-2.5 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
ports: | |
- 5432:5432 | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby: | |
- 3.2 | |
env: | |
- AR_VERSION: '7.1' | |
RUBYOPT: --enable-frozen-string-literal | |
- AR_VERSION: '7.0' | |
RUBYOPT: --enable-frozen-string-literal | |
- AR_VERSION: 6.1 | |
RUBYOPT: --enable-frozen-string-literal | |
include: | |
- ruby: 3.1 | |
env: | |
AR_VERSION: '7.1' | |
- ruby: 3.1 | |
env: | |
AR_VERSION: '7.0' | |
- ruby: 3.1 | |
env: | |
AR_VERSION: 6.1 | |
- ruby: '3.0' | |
env: | |
AR_VERSION: '7.0' | |
- ruby: '3.0' | |
env: | |
AR_VERSION: 6.1 | |
- ruby: jruby | |
env: | |
AR_VERSION: '7.0' | |
- ruby: 2.7 | |
env: | |
AR_VERSION: '7.0' | |
- ruby: 2.7 | |
env: | |
AR_VERSION: 6.1 | |
- ruby: 2.7 | |
env: | |
AR_VERSION: '6.0' | |
- ruby: jruby-9.3.10.0 | |
env: | |
AR_VERSION: '6.1' | |
- ruby: 2.6 | |
env: | |
AR_VERSION: 5.2 | |
- ruby: 2.6 | |
env: | |
AR_VERSION: 5.1 | |
- ruby: 2.4 | |
env: | |
AR_VERSION: '5.0' | |
- ruby: 2.4 | |
env: | |
AR_VERSION: 4.2 | |
runs-on: ubuntu-latest | |
env: | |
AR_VERSION: ${{ matrix.env.AR_VERSION }} | |
DB_DATABASE: activerecord_import_test | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- name: Set up databases | |
run: | | |
sudo /etc/init.d/mysql start | |
mysql -e 'CREATE DATABASE ${{ env.DB_DATABASE }} CHARACTER SET utf8 COLLATE utf8_general_ci;' -u root -proot | |
psql -h localhost -U postgres -c 'create database ${{ env.DB_DATABASE }};' | |
psql -h localhost -U postgres -d ${{ env.DB_DATABASE }} -c 'create extension if not exists hstore;' | |
psql -h localhost -U postgres -c 'create extension if not exists postgis;' | |
psql -h localhost -U postgres -c 'create extension if not exists "uuid-ossp";' | |
cp test/github/database.yml test/database.yml | |
env: | |
PGPASSWORD: postgres | |
- name: Run tests with mysql2 | |
run: | | |
bundle exec rake test:mysql2 | |
bundle exec rake test:mysql2_makara | |
bundle exec rake test:mysql2spatial | |
- name: Run tests with postgresql | |
run: | | |
bundle exec rake test:postgis | |
bundle exec rake test:postgresql | |
bundle exec rake test:postgresql_makara | |
- name: Run tests with seamless_database_pool | |
run: | | |
bundle exec rake test:seamless_database_pool | |
if: ${{ matrix.ruby < '3.0' }} | |
- name: Run tests with sqlite | |
run: | | |
bundle exec rake test:spatialite | |
bundle exec rake test:sqlite3 | |
lint: | |
runs-on: ubuntu-latest | |
env: | |
AR_VERSION: '7.0' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 2.7 | |
bundler-cache: true | |
- name: Run Rubocop | |
run: bundle exec rubocop |