name: CI on: push: branches: [main] pull_request: branches: [main] jobs: check: 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 -r requirements.txt - name: Syntax check run: | python3 -c " import ast, sys, pathlib errors = [] for f in pathlib.Path('app').rglob('*.py'): try: ast.parse(f.read_text()) except SyntaxError as e: errors.append(f'{f}: {e}') if errors: for e in errors: print('SYNTAX ERROR:', e) sys.exit(1) files = list(pathlib.Path('app').rglob('*.py')) print(f'All {len(files)} Python files OK') " - name: Import check run: python -c "from app.main import app; print('App import OK')" env: DATABASE_URL: sqlite:///./test.db SECRET_KEY: ci-test-secret-not-real TWITCH_CLIENT_ID: ci-placeholder TWITCH_CLIENT_SECRET: ci-placeholder TWITCH_REDIRECT_URI: http://localhost:8000/auth/callback APP_BASE_URL: http://localhost:8000