Spaces:
Runtime error
Runtime error
| # Lint and Test Workflow | |
| name: Lint and Test | |
| on: | |
| push: | |
| branches: [main, develop] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install flake8 black isort | |
| - name: Lint with flake8 | |
| run: | | |
| flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics || true | |
| - name: Check formatting with black | |
| run: | | |
| black --check . || true | |
| - name: Check imports with isort | |
| run: | | |
| isort --check-only . || true | |
| test-syntax: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Test Python syntax | |
| run: | | |
| python -m py_compile app.py | |
| echo "✅ Python syntax OK" | |