[ci] Ruff linter rules #134
Workflow file for this run
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 | |
| pull_request: | |
| jobs: | |
| lint-test-and-build: | |
| name: lint-test-and-build | |
| runs-on: ubuntu-latest | |
| environment: ci | |
| env: | |
| BLOB_READ_WRITE_TOKEN: ${{ secrets.BLOB_READ_WRITE_TOKEN }} | |
| VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
| VERCEL_TEAM_ID: ${{ secrets.VERCEL_TEAM_ID }} | |
| VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v3 | |
| - name: Set up virtualenv (Python 3.12) | |
| run: uv venv --python 3.12 | |
| - name: Install dependencies | |
| run: uv pip install -e .[dev] | |
| - name: Lint | |
| run: | | |
| uv run ruff format | |
| uv run ruff check --fix . | |
| uv run mypy src | |
| uv run python -c "import vercel, vercel.cache, vercel.headers, vercel.oidc" | |
| - name: Run tests | |
| run: uv run pytest -v --capture=tee-sys | |
| - name: Build package | |
| run: uv run python -m build |