mirror of
https://github.com/jazzband/django-auditlog.git
synced 2026-03-16 22:20:26 +00:00
* Add test runner and improve test with multi databases * Enhance cross-database compatibility and testing - Fix TRUNCATE command support detection for different databases - Add conditional PostgreSQL-specific model registration - Improve database-specific test skipping logic - Remove SQLite from TRUNCATE supported vendors list * Add docker compose for testing * Improve CI/CD with multi-database support - Add separate test workflows for SQLite, PostgreSQL, and MySQL * Add `mysqlclient` deps * fix minor - Add mysqlclient deps - upload coverage step * Fix coverage upload name conflicts in CI workflow - Add database type to coverage upload names (SQLite/PostgreSQL/MySQL)
47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
services:
|
|
postgres:
|
|
container_name: auditlog_postgres
|
|
image: postgres:15
|
|
restart: "no"
|
|
environment:
|
|
POSTGRES_DB: auditlog
|
|
POSTGRES_USER: ${TEST_DB_USER}
|
|
POSTGRES_PASSWORD: ${TEST_DB_PASS}
|
|
ports:
|
|
- "${TEST_DB_PORT:-5432}:5432"
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: pg_isready -U ${TEST_DB_USER} -d auditlog
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 5
|
|
|
|
mysql:
|
|
container_name: auditlog_mysql
|
|
platform: linux/x86_64
|
|
image: mysql:8.0
|
|
restart: "no"
|
|
environment:
|
|
MYSQL_DATABASE: auditlog
|
|
MYSQL_USER: ${TEST_DB_USER}
|
|
MYSQL_PASSWORD: ${TEST_DB_PASS}
|
|
MYSQL_ROOT_PASSWORD: ${TEST_DB_PASS}
|
|
ports:
|
|
- "${TEST_DB_PORT:-3306}:3306"
|
|
expose:
|
|
- '${TEST_DB_PORT:-3306}'
|
|
volumes:
|
|
- mysql-data:/var/lib/mysql
|
|
- ./docker/db/init-mysql.sh:/docker-entrypoint-initdb.d/init.sh
|
|
healthcheck:
|
|
test: mysqladmin ping -h 127.0.0.1 -u ${TEST_DB_USER} --password=${TEST_DB_PASS}
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 3
|
|
|
|
volumes:
|
|
postgres-data:
|
|
driver: local
|
|
mysql-data:
|
|
driver: local
|