Check example files are linted and formatted #24
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: Check example files are linted and formatted | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v5 | |
- name: Set up Python 3 | |
uses: actions/setup-python@v6 | |
with: | |
python-version: "3.11" | |
- name: Install uv | |
uses: astral-sh/setup-uv@v6 | |
- name: Set up virtual environment and install dependencies | |
run: | | |
uv venv .venv | |
uv pip install -r requirements-dev.txt | |
- name: Lint with ruff | |
run: | | |
uv run ruff check . | |
- name: Check formatting with black | |
run: | | |
uv run black . --check --verbose |