30 lines
664 B
YAML
30 lines
664 B
YAML
name: Ruff
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
env:
|
|
WORKING_DIRECTORY: "."
|
|
CUSTOM_PACKAGES: "instructor examples tests"
|
|
|
|
jobs:
|
|
Ruff:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v4
|
|
with:
|
|
enable-cache: true
|
|
- name: Set up Python
|
|
run: uv python install 3.9
|
|
- name: Install the project
|
|
run: uv sync --all-extras
|
|
- name: Ruff lint
|
|
run: uv run ruff check ${{ env.CUSTOM_PACKAGES }}
|
|
- name: Ruff format
|
|
run: uv run ruff format --check ${{ env.CUSTOM_PACKAGES }}
|