Bump actions/checkout from 5 to 6 #16
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, pull_request] | |
| permissions: | |
| contents: write | |
| jobs: | |
| lint-test: | |
| runs-on: ubuntu-24.04 | |
| env: | |
| PYTHONPATH: ${{ github.workspace }} | |
| SERPAPI_KEY: "test-key" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Cache pip | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Install system GUI deps (Tk + Xvfb) | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y python3-tk xvfb | |
| - name: Install deps | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install isort | |
| - name: Auto-format (black + isort) | |
| run: | | |
| isort . | |
| black . | |
| - name: Auto-commit formatted files | |
| uses: stefanzweifel/git-auto-commit-action@v6 | |
| with: | |
| commit_message: "ci(fmt): black+isort [skip ci]" | |
| file_pattern: "**/*.py" | |
| - name: Run tests (headless Tk) | |
| run: xvfb-run -a python -m pytest -q -m "not slow" |