- Updated architecture constraints documentation to include detailed sections on technical, organizational, regulatory, environmental, and performance constraints. - Created separate markdown files for each type of constraint for better organization and clarity. - Revised the architecture scope section to provide a clearer overview of the system's key areas. - Enhanced the solution strategy documentation with detailed explanations of the client-server architecture, technology choices, trade-offs, and future considerations. - Added comprehensive descriptions of backend and frontend components, middleware, and utilities in the architecture documentation. - Migrated UI, templates, and styling notes to a dedicated section for better structure. - Updated requirements.txt to include missing dependencies. - Refactored user authentication logic in the users.py and security.py files to improve code organization and maintainability, including the integration of OAuth2 password bearer token handling.
60 lines
1.8 KiB
YAML
60 lines
1.8 KiB
YAML
name: Run Tests
|
|
on: [push]
|
|
|
|
jobs:
|
|
tests:
|
|
name: ${{ matrix.target }} tests
|
|
runs-on: ubuntu-latest
|
|
container: ${{ matrix.target == 'e2e' && 'mcr.microsoft.com/playwright/python:v1.40.0-jammy' || '' }}
|
|
env:
|
|
DATABASE_DRIVER: postgresql
|
|
DATABASE_HOST: postgres
|
|
DATABASE_PORT: '5432'
|
|
DATABASE_NAME: calminer_ci
|
|
DATABASE_USER: calminer
|
|
DATABASE_PASSWORD: secret
|
|
DATABASE_SCHEMA: public
|
|
DATABASE_SUPERUSER: calminer
|
|
DATABASE_SUPERUSER_PASSWORD: secret
|
|
DATABASE_SUPERUSER_DB: calminer_ci
|
|
DATABASE_URL: postgresql+psycopg2://calminer:secret@postgres:5432/calminer_ci
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
target: [unit, e2e, lint]
|
|
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
env:
|
|
POSTGRES_DB: calminer_ci
|
|
POSTGRES_USER: calminer
|
|
POSTGRES_PASSWORD: secret
|
|
options: >-
|
|
--health-cmd "pg_isready -U calminer -d calminer_ci"
|
|
--health-interval 10s
|
|
--health-timeout 5s
|
|
--health-retries 10
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
- name: Cache pip dependencies
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ~/.cache/pip
|
|
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt', 'requirements-test.txt') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pip-
|
|
- name: Prepare Python environment
|
|
uses: ./.gitea/actions/setup-python-env
|
|
with:
|
|
install-playwright: ${{ matrix.target != 'e2e' }}
|
|
- name: Run tests
|
|
run: |
|
|
if [ "${{ matrix.target }}" = "unit" ]; then
|
|
pytest tests/unit
|
|
elif [ "${{ matrix.target }}" = "lint" ]; then
|
|
ruff check .
|
|
else
|
|
pytest tests/e2e
|
|
fi
|