mirror of
https://github.com/silverqx/TinyORM.git
synced 2026-02-11 12:59:16 -06:00
use tom migrations in unit tests for PostgreSQL 💪
- added fixPostgresSequences() to our tom seeder - added PostgreSQL connection to tom_testdata - updated msvc workflow - tom, throw if empty connection only if exactly one connection provided - also updated create_and_seed_database.php script to exclude postgres connection using --skip-postgres-migrate command-line parameter
This commit is contained in:
23
.github/workflows/msvc.yml
vendored
23
.github/workflows/msvc.yml
vendored
@@ -196,20 +196,8 @@ jobs:
|
||||
working-directory: ../TinyORM-builds-cmake/build-msvc-cmake-debug/tests/testdata_tom
|
||||
run: |
|
||||
$env:Path = '..\..;' + $env:Path
|
||||
.\tom_testdata.exe migrate --seed --no-ansi
|
||||
env:
|
||||
DB_MYSQL_CHARSET: utf8mb4
|
||||
DB_MYSQL_COLLATION: utf8mb4_0900_ai_ci
|
||||
DB_MYSQL_DATABASE: ${{ secrets.DB_MYSQL_DATABASE }}
|
||||
DB_MYSQL_HOST: ${{ secrets.DB_MYSQL_HOST }}
|
||||
DB_MYSQL_PASSWORD: ${{ secrets.DB_MYSQL_PASSWORD }}
|
||||
DB_MYSQL_USERNAME: ${{ secrets.DB_MYSQL_USERNAME }}
|
||||
TOM_TESTDATA_ENV: testing
|
||||
|
||||
- name: Create and Seed tables for unit tests (PostgreSQL, SQLite)
|
||||
working-directory: tests/testdata
|
||||
run: |
|
||||
php.exe ./create_and_seed_database.php --skip-mysql-migrate
|
||||
.\tom_testdata.exe migrate --database=tinyorm_testdata_tom_mysql --seed --no-ansi
|
||||
.\tom_testdata.exe migrate --database=tinyorm_testdata_tom_postgres --seed --no-ansi
|
||||
env:
|
||||
DB_MYSQL_CHARSET: utf8mb4
|
||||
DB_MYSQL_COLLATION: utf8mb4_0900_ai_ci
|
||||
@@ -222,6 +210,13 @@ jobs:
|
||||
DB_PGSQL_HOST: ${{ secrets.DB_PGSQL_HOST }}
|
||||
DB_PGSQL_PASSWORD: ${{ secrets.DB_PGSQL_PASSWORD }}
|
||||
DB_PGSQL_USERNAME: ${{ secrets.DB_PGSQL_USERNAME }}
|
||||
TOM_TESTDATA_ENV: testing
|
||||
|
||||
- name: Create and Seed tables for unit tests (PostgreSQL, SQLite)
|
||||
working-directory: tests/testdata
|
||||
run: |
|
||||
php.exe ./create_and_seed_database.php --skip-mysql-migrate --skip-postgres-migrate
|
||||
env:
|
||||
DB_SQLITE_DATABASE: ${{ runner.temp }}/${{ secrets.DB_SQLITE_DATABASE }}
|
||||
|
||||
- name: TinyORM execute ctest 🔥
|
||||
|
||||
Reference in New Issue
Block a user