ci(postgres): add flag to enable/disable postgres ci

This commit is contained in:
AarDG10 2025-11-05 17:37:12 +05:30
parent 420c1e7994
commit a4304124ec
2 changed files with 6 additions and 1 deletions

View file

@ -22,6 +22,10 @@ on:
required: false
type: boolean
default: false
enable-postgres:
required: false
type: boolean
default: true
enable-coverage:
required: false
type: boolean
@ -62,7 +66,7 @@ jobs:
strategy:
fail-fast: false
matrix:
db: ${{ fromJson(inputs.enable-sqlite && '["mariadb", "postgres", "sqlite"]' || '["mariadb", "postgres"]') }}
db: ${{ fromJson(inputs.enable-sqlite && (inputs.enable-postgres && '["mariadb", "postgres", "sqlite"]' || '["mariadb", "sqlite"]') || (inputs.enable-postgres && '["mariadb", "postgres"]' || '["mariadb"]')) }}
index: ${{ fromJson(needs.gen-idx-integration.outputs.indices) }}
services:
postgres:

View file

@ -44,6 +44,7 @@ jobs:
name: Tests
uses: ./.github/workflows/_base-server-tests.yml
with:
enable-postgres: true # This enables PostgreSQL to run tests
enable-sqlite: false # This will test against both MariaDB and SQLite if enabled
parallel-runs: 2
enable-coverage: ${{ github.event_name != 'pull_request' }}