add basic formatting and remove unused imports #2
Workflow file for this run
This file contains 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: Style check | |
on: push | |
jobs: | |
style-check: | |
env: | |
UV_CACHE_DIR: ${{ github.workspace }}/.cache/uv | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4.2.1 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v3.1.7 | |
with: | |
enable-cache: true | |
cache-dependency-glob: "uv.lock" | |
- name: Set up Python | |
uses: actions/setup-python@v5.2.0 | |
with: | |
python-version-file: "pyproject.toml" | |
- name: Restore uv cache | |
uses: actions/cache@v4.1.2 | |
with: | |
path: ${{ github.workspace }}/.cache/uv | |
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }} | |
restore-keys: | | |
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }} | |
uv-${{ runner.os }} | |
- name: Install dependencies | |
run: uv sync --all-extras --dev | |
- name: Check linting with Ruff | |
run: uv run ruff check | |
- name: Check format with Ruff | |
run: uv run ruff format --check | |
- name: Check docstring coverage | |
run: uv run docstr-coverage ./**/*.py --fail-under 20 --skip-file-doc --verbose=2 | |
- name: Minimize uv cache | |
run: uv cache prune --ci |