Spaces:
Running on Zero
Running on Zero
| name: CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| name: Test and lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v8.2.0 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: | | |
| pyproject.toml | |
| uv.lock | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.10" | |
| - name: Restore virtual environment | |
| id: cache-venv | |
| uses: actions/cache@v5 | |
| with: | |
| path: .venv | |
| key: venv-${{ runner.os }}-py3.10-${{ hashFiles('uv.lock') }} | |
| - name: Install dependencies | |
| if: steps.cache-venv.outputs.cache-hit != 'true' | |
| run: uv sync --locked --extra dev | |
| - name: Run unit tests | |
| run: uv run python -m unittest discover -s tests | |
| - name: Compile Python files | |
| run: uv run python -m py_compile app.py src/pozify/*.py src/pozify/steps/*.py tests/*.py | |
| - name: Run Ruff | |
| run: uv run ruff check . | |