Refactor commander and Click support (#49) #262
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: Python library with uv | |
env: | |
COLUMNS: 120 | |
on: | |
push: | |
paths: | |
- 'cliffy/**' | |
- 'tests/**' | |
- 'examples/**' | |
- '!examples/generated/**' | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
build: | |
strategy: | |
matrix: | |
extras: [true] # false | |
python-version: [ "3.13", "3.12", "3.11", "3.10", "3.9" ] | |
os: [ubuntu-latest] # windows-latest, macos-latest | |
defaults: | |
run: | |
shell: bash | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
enable-cache: true | |
cache-suffix: ${{ matrix.extras }} | |
- name: Install library | |
run: uv sync | |
if: ${{ matrix.extras == false }} | |
- name: Install library | |
run: uv sync --all-extras | |
if: ${{ matrix.extras }} | |
- name: Code quality | |
run: | | |
uv run make lint | |
- name: Test with pytest | |
run: | | |
uv run make test | |
- name: Minimize uv cache | |
run: uv cache prune --ci |