Skip to content

Commit

Permalink
chore: add Spatialite tests to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Oreilles committed Nov 25, 2023
1 parent 9b89655 commit c3ecaba
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/test-query-engine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ jobs:
single_threaded: false
connector: 'sqlite'
version: '3'
- name: 'spatialite'
single_threaded: false
connector: 'sqlite'
version: '3-spatialite'
- name: 'mongodb_4_2'
single_threaded: true
connector: 'mongodb'
Expand Down Expand Up @@ -113,12 +117,18 @@ jobs:

- uses: dtolnay/rust-toolchain@stable

- name: Install Spatialite
if: ${{ matrix.database.name == 'spatialite' }}
run: apt install -y libsqlite3-mod-spatialite

- run: export WORKSPACE_ROOT=$(pwd) && cargo test --package query-engine-tests -- --test-threads=1
if: ${{ matrix.database.single_threaded }}
env:
CLICOLOR_FORCE: 1
SPATIALITE_PATH: ${{ matrix.database.name == 'spatialite' && 'mod_spatialite' || null }}

- run: export WORKSPACE_ROOT=$(pwd) && cargo test --package query-engine-tests -- --test-threads=8
if: ${{ !matrix.database.single_threaded }}
env:
CLICOLOR_FORCE: 1
SPATIALITE_PATH: ${{ matrix.database.name == 'spatialite' && 'mod_spatialite' || null }}
10 changes: 10 additions & 0 deletions .github/workflows/test-schema-engine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ jobs:
url: 'postgresql://prisma@localhost:26257'
- name: sqlite
url: sqlite
- name: spatialite
url: sqlite
- name: vitess_8_0
url: 'mysql://root:prisma@localhost:33807/test'
shadow_database_url: 'mysql://root:prisma@localhost:33808/shadow'
Expand All @@ -118,6 +120,10 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Install Spatialite
if: ${{ matrix.database.name == 'spatialite' }}
run: sudo apt install -y libsqlite3-mod-spatialite

- name: 'Start ${{ matrix.database.name }}'
run: make start-${{ matrix.database.name }}

Expand All @@ -126,25 +132,29 @@ jobs:
env:
CLICOLOR_FORCE: 1
TEST_DATABASE_URL: ${{ matrix.database.url }}
SPATIALITE_PATH: ${{ matrix.database.name == 'spatialite' && 'mod_spatialite' || null }}

- run: cargo test -p sql-schema-describer
if: ${{ !matrix.database.single_threaded }}
env:
CLICOLOR_FORCE: 1
TEST_DATABASE_URL: ${{ matrix.database.url }}
SPATIALITE_PATH: ${{ matrix.database.name == 'spatialite' && 'mod_spatialite' || null }}

- run: cargo test -p sql-migration-tests
if: ${{ !matrix.database.single_threaded }}
env:
CLICOLOR_FORCE: 1
TEST_DATABASE_URL: ${{ matrix.database.url }}
SPATIALITE_PATH: ${{ matrix.database.name == 'spatialite' && 'mod_spatialite' || null }}
RUST_LOG: debug

- run: cargo test -p schema-engine-cli
if: ${{ !matrix.database.single_threaded }}
env:
CLICOLOR_FORCE: 1
TEST_DATABASE_URL: ${{ matrix.database.url }}
SPATIALITE_PATH: ${{ matrix.database.name == 'spatialite' && 'mod_spatialite' || null }}

- run: cargo test -p sql-introspection-tests -- --test-threads=1
if: ${{ matrix.database.is_vitess }}
Expand Down

0 comments on commit c3ecaba

Please sign in to comment.