Skip to content

Cleanup: Update gitignore and remove logs #6

Cleanup: Update gitignore and remove logs

Cleanup: Update gitignore and remove logs #6

Workflow file for this run

---
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
name: Checkout
- uses: actions/setup-python@v4
name: Set up Python
with:
python-version: '3.12'
- uses: actions/cache@v4
name: Cache pip
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then
pip install -r requirements.txt || true
fi
if [ -f backend/requirements.txt ]; then
pip install -r backend/requirements.txt || true
fi
- name: Install test tools
run: |
python -m pip install --upgrade pip
pip install pytest || true
pip install yamllint || true
pip install flake8 || true
pip install mypy || true
pip install python-docx || true
pip install fpdf2 || true
pip install pypdf2 || true
- uses: ibiqlik/action-yamllint@v3
name: YAML lint
with:
file_or_dir: .
- name: Import smoke test
run: |
python - <<'PY'
import importlib
importlib.import_module('backend')
print('backend import OK')
PY
- name: Run tests
run: pytest -q
compose-validate:
runs-on: ubuntu-latest
needs: lint-and-test
steps:
- uses: actions/checkout@v4
name: Checkout
- name: Prepare env
run: |
cp .env.example .env || touch .env
- name: Validate docker-compose
run: docker compose -f docker-compose.yml config