CI unit test improvements (#13257)

Speed improvements for backend CI testing

- Use different coverage tool
- Optimize plugin reloading during tests
- Mock longer running processes
- Adjust postgres configuration
- Reduce test setup time
This commit is contained in:
Oliver authored and GitHub committed 2026-11-13 07:35:11 +11:00
1 parent 6387ae95e1
commit cdfa7f1921
11 files changed
+141 -50

No files matched your search

+10
View File
@@ -487,6 +487,16 @@ jobs:
dev-install: true
update: true
static: true
# The database is discarded after the run - durability is not required
- name: Tune PostgreSQL for Testing
env:
PG_CONTAINER: ${{ job.services.postgres.id }}
run: |
docker exec "$PG_CONTAINER" psql -U inventree \
-c "ALTER SYSTEM SET fsync = off" \
-c "ALTER SYSTEM SET synchronous_commit = off" \
-c "ALTER SYSTEM SET full_page_writes = off" \
-c "SELECT pg_reload_conf()"
# Coverage is collected here (not on SQLite) so that tests which require
# select_for_update (concurrency / locking tests) contribute to coverage
- name: Coverage Tests