feat: Update CI workflows for Docker image build and deployment, enhance test configurations, and add testing documentation
All checks were successful
Run Tests / e2e tests (push) Successful in 1m49s
Run Tests / unit tests (push) Successful in 11s

This commit is contained in:
2025-10-25 21:28:49 +02:00
parent ec56099e2a
commit 0550928a2f
8 changed files with 73 additions and 27 deletions

View File

@@ -2,7 +2,13 @@ name: Run Tests
on: [push]
jobs:
test:
tests:
name: ${{ matrix.target }} tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target: [unit, e2e]
services:
postgres:
image: postgres:16-alpine
@@ -10,14 +16,11 @@ jobs:
POSTGRES_DB: calminer_ci
POSTGRES_USER: calminer
POSTGRES_PASSWORD: secret
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U calminer -d calminer_ci"
--health-interval 10s
--health-timeout 5s
--health-retries 10
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
@@ -54,6 +57,7 @@ jobs:
pip install -r requirements.txt
pip install -r requirements-test.txt
- name: Install Playwright browsers
if: ${{ matrix.target == 'e2e' }}
run: |
python -m playwright install --with-deps
- name: Wait for database service
@@ -122,4 +126,9 @@ jobs:
env:
DATABASE_URL: postgresql+psycopg2://calminer:secret@postgres:5432/calminer_ci
DATABASE_SCHEMA: public
run: pytest
run: |
if [ "${{ matrix.target }}" = "unit" ]; then
pytest tests/unit
else
pytest tests/e2e
fi