1
0
Fork 0
mirror of https://github.com/kemayo/leech synced 2026-03-07 04:51:46 +01:00
leech/.github/workflows/python-package-poetry.yml
2026-03-06 12:14:35 -06:00

51 lines
1.4 KiB
YAML

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python package
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync
- name: Lint with ruff
run: uv run ruff check .
- name: Make sure help runs
run: uv run leech --help
- name: Build a cover
run: uv run python -m 'ebook.cover' && file -E output.png && rm output.png
- name: Verify build
run: uv build && ls -og dist/*
- name: eclint
uses: snow-actions/eclint@v1.0.1
with:
args: 'check *.py sites/*.py'
poetry-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install dependencies
run: poetry install
- name: Make sure help runs
run: poetry run leech --help
- name: Verify poetry build
run: poetry build && ls -og dist/*