feat(ci): disable postgres durability features when testing

This commit is contained in:
kolaente 2025-05-15 10:05:07 +02:00
parent 3e46457c03
commit 410ad13a70
No known key found for this signature in database
GPG Key ID: F40E70337AB24C9B
1 changed files with 9 additions and 0 deletions

View File

@ -205,6 +205,15 @@ jobs:
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5 uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
with: with:
go-version: stable go-version: stable
- name: Configure Postgres for faster tests
if: matrix.db == 'postgres'
run: |
# Connect to Postgres and disable fsync, full_page_writes, and synchronous_commit for faster tests
PGPASSWORD=vikunjatest psql -h localhost -U postgres -d vikunjatest -c "ALTER SYSTEM SET fsync = off;"
PGPASSWORD=vikunjatest psql -h localhost -U postgres -d vikunjatest -c "ALTER SYSTEM SET full_page_writes = off;"
PGPASSWORD=vikunjatest psql -h localhost -U postgres -d vikunjatest -c "ALTER SYSTEM SET synchronous_commit = off;"
# Reload the configuration
PGPASSWORD=vikunjatest psql -h localhost -U postgres -d vikunjatest -c "SELECT pg_reload_conf();"
- name: test - name: test
env: env:
VIKUNJA_TESTS_USE_CONFIG: ${{ matrix.db != 'sqlite-in-memory' && 1 || 0 }} VIKUNJA_TESTS_USE_CONFIG: ${{ matrix.db != 'sqlite-in-memory' && 1 || 0 }}