Some checks failed
CI / lint-and-test (pull_request) Has been cancelled
Phase 2 of pipeline refactoring: - pyproject.toml: Python >=3.11, aiohttp dep, dev extras (pytest, pytest-asyncio, ruff). Ruff configured with sane defaults + ignore rules for existing code patterns (implicit Optional, timezone.utc). - .forgejo/workflows/ci.yml: Forgejo Actions CI — syntax check, ruff lint, ruff format, pytest on every PR and push to main. - deploy.sh: Pull + venv update + syntax check + optional restart. Replaces ad-hoc scp workflow. - tests/conftest.py: Shared fixture for in-memory SQLite with full schema. Ready for Phase 4 test suite. - .gitignore: Added venv, pytest cache, coverage, build artifacts. - Ruff auto-fixes: import sorting, unused imports removed across all modules. All files pass ruff check + ruff format. Pentagon-Agent: Ganymede <F99EBFA6-547B-4096-BEEA-1D59C3E4028A>
51 lines
1.2 KiB
YAML
51 lines
1.2 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
lint-and-test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -e ".[dev]"
|
|
|
|
- name: Syntax check
|
|
run: |
|
|
python -c "
|
|
import ast, pathlib, sys
|
|
errors = []
|
|
for f in pathlib.Path('.').rglob('*.py'):
|
|
if '.venv' in str(f) or '.forgejo' in str(f):
|
|
continue
|
|
try:
|
|
ast.parse(f.read_text())
|
|
except SyntaxError as e:
|
|
errors.append(f'{f}: {e}')
|
|
if errors:
|
|
for e in errors:
|
|
print(f'SYNTAX ERROR: {e}', file=sys.stderr)
|
|
sys.exit(1)
|
|
print('All Python files pass syntax check')
|
|
"
|
|
|
|
- name: Ruff lint
|
|
run: ruff check .
|
|
|
|
- name: Ruff format check
|
|
run: ruff format --check .
|
|
|
|
- name: Run tests
|
|
run: pytest -v --tb=short
|
|
continue-on-error: true # Tests don't exist yet — remove this line after Phase 4
|