1 Commits

Author SHA1 Message Date
7879d54958 feat: add parser source dashboard and scheduling
Some checks failed
CI/CD Pipeline / Code Quality Checks (pull_request) Failing after 10m20s
CI/CD Pipeline / Run Tests (pull_request) Failing after 11m5s
CI/CD Pipeline / Build Docker Images (pull_request) Has been skipped
CI/CD Pipeline / Push to Gitea Registry (pull_request) Has been skipped
2026-04-27 23:56:16 +02:00
2 changed files with 50 additions and 11 deletions

View File

@@ -10,7 +10,6 @@ jobs:
lint:
name: Code Quality Checks
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout code
@@ -22,7 +21,9 @@ jobs:
python-version: '3.11'
- name: Install uv
run: python -m pip install --upgrade pip uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Create virtual environment
run: uv venv
@@ -35,17 +36,40 @@ jobs:
- name: Run Ruff linting
run: |
source .venv/bin/activate
ruff check src
ruff check .
- name: Run Ruff formatting check
run: |
source .venv/bin/activate
ruff format src --check
ruff format . --check
test:
name: Run Tests
runs-on: ubuntu-latest
timeout-minutes: 20
services:
postgres:
image: postgres:15.10
env:
POSTGRES_DB: test_db
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
redis:
image: redis:7-alpine
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
steps:
- name: Checkout code
@@ -57,7 +81,9 @@ jobs:
python-version: '3.11'
- name: Install uv
run: python -m pip install --upgrade pip uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Create virtual environment
run: uv venv
@@ -67,6 +93,20 @@ jobs:
source .venv/bin/activate
uv sync --dev
- name: Wait for services to be ready
run: |
# Wait for PostgreSQL
until pg_isready -h localhost -p 5432 -U postgres; do
echo "Waiting for PostgreSQL..."
sleep 2
done
# Wait for Redis
until redis-cli -h localhost -p 6379 ping; do
echo "Waiting for Redis..."
sleep 2
done
- name: Run Django tests
run: |
source .venv/bin/activate
@@ -74,14 +114,15 @@ jobs:
python manage.py test --verbosity=2
env:
DJANGO_SETTINGS_MODULE: config.settings.test
DATABASE_URL: postgres://postgres:postgres@localhost:5432/test_db
REDIS_URL: redis://localhost:6379/0
CELERY_BROKER_URL: redis://localhost:6379/0
SECRET_KEY: test-secret-key-for-ci
build:
name: Build Docker Images
runs-on: ubuntu-latest
timeout-minutes: 20
needs: [lint, test]
if: github.event_name != 'pull_request'
steps:
- name: Checkout code

View File

@@ -106,7 +106,7 @@ packages = ["src"]
# ==================================================================================
[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "config.settings.test"
pythonpath = ["src"]
python_paths = ["src"]
testpaths = ["tests"]
addopts = [
"--verbose",
@@ -127,8 +127,6 @@ markers = [
"serializers: marks tests for serializers",
"services: marks tests for services",
"factories: marks tests for factories",
"network: marks tests that require network access",
"e2e: marks end-to-end tests",
]
filterwarnings = [