ci(postgres): add flag to enable/disable postgres ci
This commit is contained in:
parent
420c1e7994
commit
a4304124ec
2 changed files with 6 additions and 1 deletions
6
.github/workflows/_base-server-tests.yml
vendored
6
.github/workflows/_base-server-tests.yml
vendored
|
|
@ -22,6 +22,10 @@ on:
|
||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
|
enable-postgres:
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
enable-coverage:
|
enable-coverage:
|
||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
|
|
@ -62,7 +66,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
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) }}
|
index: ${{ fromJson(needs.gen-idx-integration.outputs.indices) }}
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
|
|
|
||||||
1
.github/workflows/server-tests.yml
vendored
1
.github/workflows/server-tests.yml
vendored
|
|
@ -44,6 +44,7 @@ jobs:
|
||||||
name: Tests
|
name: Tests
|
||||||
uses: ./.github/workflows/_base-server-tests.yml
|
uses: ./.github/workflows/_base-server-tests.yml
|
||||||
with:
|
with:
|
||||||
|
enable-postgres: true # This enables PostgreSQL to run tests
|
||||||
enable-sqlite: false # This will test against both MariaDB and SQLite if enabled
|
enable-sqlite: false # This will test against both MariaDB and SQLite if enabled
|
||||||
parallel-runs: 2
|
parallel-runs: 2
|
||||||
enable-coverage: ${{ github.event_name != 'pull_request' }}
|
enable-coverage: ${{ github.event_name != 'pull_request' }}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue