Skip to content

Add linting and format with ruff #15

Add linting and format with ruff

Add linting and format with ruff #15

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Python lint and test
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_call:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version-file: ".python-version"
- name: Set up uv
run: |
curl -LsSf https://astral.sh/uv/0.3.2/install.sh | sh
- name: Install dependencies with uv
run: |
uv pip install -r pyproject.toml --extra dev
env:
UV_SYSTEM_PYTHON: 1
- name: Lint and format with ruff
run: |
ruff format --check
ruff check --output-format github
- name: Test with pytest
run: |
pytest
env:
OPENAI_API_KEY: sk-fake-openai-key
GROQ_API_KEY: gsk_fake_groq_key