Merge pull request #21 from arandomguyhere/claude/evaluate-situation-… #4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main, master] | |
| pull_request: | |
| branches: [main, master] | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install ruff black isort | |
| - name: Check formatting with Black | |
| run: black --check --diff . | |
| continue-on-error: true | |
| - name: Check imports with isort | |
| run: isort --check-only --diff . | |
| continue-on-error: true | |
| - name: Lint with Ruff | |
| run: ruff check . | |
| continue-on-error: true | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| 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 || pip install flask aiohttp beautifulsoup4 pyyaml requests | |
| pip install pytest pytest-asyncio | |
| - name: Run tests | |
| run: | | |
| pytest tests/ -v --tb=short || echo "No tests found or tests failed" | |
| continue-on-error: true | |
| - name: Validate Python syntax | |
| run: | | |
| python -m py_compile server.py | |
| find scripts -name "*.py" -exec python -m py_compile {} \; | |
| build-static: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| 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 || pip install flask aiohttp beautifulsoup4 pyyaml requests | |
| - name: Build static site | |
| run: python build_static.py | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: static-site | |
| path: dist/ |