diff --git a/.github/workflows/docu.yml b/.github/workflows/docu.yml index c384783..d4a9d00 100644 --- a/.github/workflows/docu.yml +++ b/.github/workflows/docu.yml @@ -30,4 +30,4 @@ jobs: path: .cache restore-keys: | mkdocs-material- - - run: uv run mkdocs gh-deploy --force + - run: uv run --group docs mkdocs gh-deploy --force diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cc1776c..f495865 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,8 +20,24 @@ jobs: - name: Run checks run: uv run inv check + tests: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.11", "3.12", "3.13"] + steps: + - name: Check out + uses: actions/checkout@v4 + - name: Set up the environment with multiple python versions + uses: astral-sh/setup-uv@v6 + with: + version: "0.8.16" + enable-cache: true + cache-dependency-glob: "pyproject.toml" + python-version: ${{ matrix.python-version }} - name: Run test - run: uv run inv tests.run + run: uv run --group test inv tests.run --parallel check-docs: runs-on: ubuntu-latest @@ -33,4 +49,4 @@ jobs: uses: ./.github/actions/setup-venv - name: Check if documentation can be built - run: uv run mkdocs build -s + run: uv run --group docs inv docs.build diff --git a/.gitignore b/.gitignore index c78fe4c..10ab90e 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ slim.report.* .infisical.json backups uv.lock +.vscode # # # Byte-compiled / optimized / DLL files diff --git a/README.md b/README.md index 8d55cf1..f192c33 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@

Imgora

- Imgora + Imgora

Chainable Python client for Imagor and Thumbor image processing servers

- Documentation - | PyPI + Documentation + | PyPI

--- diff --git a/pyproject.toml b/pyproject.toml index aa0bb4d..efa5441 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,6 +65,7 @@ test = [ "pytest>=8.3.4", "pytest-cov>=4.1.0", "pytest-docker>=1.0.0", + "pytest-xdist>=3.8.0", ] diff --git a/tasks/project.py b/tasks/project.py index 619b972..13ce914 100644 --- a/tasks/project.py +++ b/tasks/project.py @@ -81,7 +81,7 @@ def install( if venv_update: update_venv(c) if group: - success(f"Group {', '.join([f"'{g}'" for g in group])} installed.") + success("Group " + ", ".join([f"'{g}'" for g in group]) + " installed.") success("Installation done, your are ready to go ...") @@ -126,7 +126,7 @@ def release( if unreleased or length == 0: echo("\n".join(cl)) else: - echo(f"{"\n".join(cl[:length])}\n...\n") + echo("\n".join(cl[:length]) + "\n...\n") header("Changelog end") if dry else None else: cl = ( diff --git a/tasks/tests.py b/tasks/tests.py index 6fc7092..407ec56 100644 --- a/tasks/tests.py +++ b/tasks/tests.py @@ -1,13 +1,13 @@ from tasks import ( + Ctx, doc, header, task, - Ctx, ) @task -def run(c: Ctx): +def run(c: Ctx, parallel: bool = False): """Run tests""" header(doc()) - c.run("pytest -v", echo=True, pty=True) + c.run("pytest -v" + (" -n auto" if parallel else ""), echo=True, pty=True)