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

View File

@@ -205,6 +205,15 @@ jobs:
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
with:
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
env:
VIKUNJA_TESTS_USE_CONFIG: ${{ matrix.db != 'sqlite-in-memory' && 1 || 0 }}