ci: 🐍 update workflows to use specific uv version and improve environment configuration

This commit is contained in:
Onuralp SEZER 2025-01-08 23:49:43 +03:00
parent fc40438f35
commit 6ae1dfdcb0
No known key found for this signature in database
GPG Key ID: CF0835DFDF14CA38
6 changed files with 24 additions and 26 deletions

View File

@ -34,7 +34,7 @@ jobs:
fetch-depth: 0
- name: 🐍 Install uv and set Python ${{ matrix.python-version }}
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@887a942a15af3a7626099df99e897a18d9e5ab3a
with:
python-version: ${{ matrix.python-version }}

View File

@ -12,9 +12,11 @@ permissions: {} # Explicitly remove all permissions by default
jobs:
build-and-publish-pre-release:
name: Publish Pre-releasePackage
name: Publish Pre-release Package
runs-on: ubuntu-latest
environment: test
environment:
name: test
url: https://pypi.org/project/supervision/
timeout-minutes: 10
permissions:
id-token: write # Required for PyPI publishing
@ -26,19 +28,16 @@ jobs:
- name: 📥 Checkout the repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: 🐍 Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
- name: 🐍 Install uv and set Python version ${{ matrix.python-version }}
uses: astral-sh/setup-uv@887a942a15af3a7626099df99e897a18d9e5ab3a # v5.1.0
with:
python-version: ${{ matrix.python-version }}
- name: 📜 Setup Poetry
uses: abatilo/actions-poetry@3765cf608f2d4a72178a9fc5b918668e542b89b1 # v4.0.0
- name: 🏗️ Build source and wheel distributions
run: |
poetry install --with=build
poetry build
poetry run twine check --strict dist/*
uv pip install -r pyproject.toml --extra build
uv build
uv run twine check --strict dist/*
- name: 🚀 Publish to PyPi
uses: pypa/gh-action-pypi-publish@67339c736fd9354cd4f8cb0b744f2b82a74b5c70 # v1.12.3

View File

@ -9,10 +9,12 @@ on:
permissions: {} # Explicitly remove all permissions by default
jobs:
build-and-publish-pre-release:
build-and-publish-release:
name: Publish Release Package
runs-on: ubuntu-latest
environment: release
environment:
name: release
url: https://pypi.org/project/supervision/
timeout-minutes: 10
permissions:
id-token: write # Required for PyPI publishing
@ -24,19 +26,16 @@ jobs:
- name: 📥 Checkout the repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: 🐍 Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
- name: 🐍 Install uv and set Python version ${{ matrix.python-version }}
uses: astral-sh/setup-uv@887a942a15af3a7626099df99e897a18d9e5ab3a # v5.1.0
with:
python-version: ${{ matrix.python-version }}
- name: 📜 Setup Poetry
uses: abatilo/actions-poetry@3765cf608f2d4a72178a9fc5b918668e542b89b1 # v4.0.0
- name: 🏗️ Build source and wheel distributions
run: |
poetry install --with=build
poetry build
poetry run twine check --strict dist/*
uv pip install -r pyproject.toml --extra build
uv build
uv run twine check --strict dist/*
- name: 🚀 Publish to PyPi
uses: pypa/gh-action-pypi-publish@67339c736fd9354cd4f8cb0b744f2b82a74b5c70 # v1.12.3

View File

@ -24,7 +24,7 @@ jobs:
fetch-depth: 0
- name: 🐍 Install uv and set Python ${{ matrix.python-version }}
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@887a942a15af3a7626099df99e897a18d9e5ab3a
with:
python-version: ${{ matrix.python-version }}

View File

@ -1,4 +1,4 @@
name: 🔧 Uv Checks and Test Workflow
name: 🔧 Test Workflow
on:
push:
paths:
@ -11,7 +11,7 @@ on:
workflow_dispatch:
jobs:
poetry-tests:
tests:
name: Uv install and check
timeout-minutes: 10
strategy:
@ -25,7 +25,7 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: 🐍 Install uv and set Python version ${{ matrix.python-version }}
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@887a942a15af3a7626099df99e897a18d9e5ab3a # v5.1.0
with:
python-version: ${{ matrix.python-version }}

View File

@ -4760,7 +4760,7 @@ wheels = [
[[package]]
name = "supervision"
version = "0.26.0rc2"
version = "0.26.0rc3"
source = { editable = "." }
dependencies = [
{ name = "defusedxml" },