Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ updates:
schedule:
interval: "daily"

- package-ecosystem: "pip"
- package-ecosystem: "uv"
directory: "/"
open-pull-requests-limit: 10
schedule:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependabot_updates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: dependabot/fetch-metadata@v3.1.0

- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --merge "$PR_URL"
run: gh pr merge --auto --rebase "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
24 changes: 13 additions & 11 deletions .github/workflows/github_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
tags:
- 'v*'

permissions:
contents: write

Check warning on line 11 in .github/workflows/github_release.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Move this write permission from workflow level to job level.

See more on https://sonarcloud.io/project/issues?id=Diapolo10_python-ms&issues=AZ4ilBOaZSyw5wRb3hUT&open=AZ4ilBOaZSyw5wRb3hUT&pullRequest=406

Check notice

Code scanning / SonarCloud

Write permissions should be defined at the job level

<!--SONAR_ISSUE_KEY:AZ4ilBOaZSyw5wRb3hUT-->Move this write permission from workflow level to job level. <p>See more on <a href="https://sonarcloud.io/project/issues?id=Diapolo10_python-ms&issues=AZ4ilBOaZSyw5wRb3hUT&open=AZ4ilBOaZSyw5wRb3hUT&pullRequest=406">SonarQube Cloud</a></p>
Comment thread
Diapolo10 marked this conversation as resolved.
Dismissed

jobs:
build:
name: Build Binaries for ${{ matrix.os }}-${{ matrix.python-version }}
Expand All @@ -16,29 +19,28 @@
os: [ ubuntu-latest ]
python-version: [
'3.11',
# 'pypy-3.9', # Waiting for 3.10 support for match-case
'pypy-3.11',
]
steps:

- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0 # Fetch all history for versioning
fetch-tags: true # Fetch tags for versioning

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
cache-dependency-glob: "uv.lock"
enable-cache: true
python-version: ${{ matrix.python-version }}

- name: Install Poetry
uses: Gr1N/setup-poetry@v9

- name: Install library and dependencies
run: |
poetry run pip install --upgrade pip setuptools
poetry install
run: uv sync --frozen

- name: Build releases
run: |
poetry build
run: uv build

- name: Upload builds
uses: actions/upload-artifact@v7
Expand Down
23 changes: 18 additions & 5 deletions .github/workflows/pypi_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,23 @@ jobs:
steps:

- name: Checkout repository
uses: actions/checkout@master
uses: actions/checkout@v6
with:
fetch-depth: 0 # Fetch all history for versioning
fetch-tags: true # Fetch tags for versioning

- name: Publish distribution 📦 to PyPI
uses: JRubics/poetry-publish@v2.1
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
ignore_dev_requirements: 'yes'
pypi_token: ${{ secrets.PYPI_PASSWORD }}
cache-dependency-glob: "uv.lock"
enable-cache: true

- name: Build
run: uv build

- name: Publish distribution 📦 to PyPI
run: uv publish
env:
UV_PUBLISH_URL: https://upload.pypi.org/legacy/
UV_PUBLISH_CHECK_URL: https://pypi.org/simple/
UV_PUBLISH_TOKEN: ${{ secrets.TEST_PYPI_PASSWORD }}
16 changes: 6 additions & 10 deletions .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,19 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v6

- name: Set up Python 3.11
uses: actions/setup-python@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
python-version: '3.11'

- name: Install Poetry
uses: Gr1N/setup-poetry@v9
cache-dependency-glob: "uv.lock"
enable-cache: true

- name: Install library and dependencies
run: |
poetry run pip install --upgrade pip setuptools
poetry install --only linters
run: uv sync --frozen

- name: Lint with Ruff
id: lint
run: |
poetry run ruff check --fix .
uv run --frozen ruff check --fix .
echo "RUFF_SUCCESS=$([ $? -eq 0 ])" >> $GITHUB_OUTPUT

- name: Create Pull Request
Expand Down
71 changes: 44 additions & 27 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,36 @@

name: Unit tests

on: [ push, pull_request ]
on:
push:
branches:
- 'main'
tags-ignore:
- 'v*' # Avoid re-running existing commit on release
pull_request:
branches:
- 'main'

permissions:
contents: read

env:
FORCE_COLOR: 1

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
python-version: [
'3.10',
'3.11',
# 'pypy-3.10'
'3.12',
'3.13',
'3.14',
'pypy-3.11',
]

# exclude:
# - os: windows-latest
# python-version: 'pypy-3.10'
# - os: macos-latest
# python-version: 'pypy-3.10'

env:
PYTHON_VERSION: ${{ matrix.python-version }}

Expand All @@ -35,22 +45,18 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v6

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
cache-dependency-glob: "uv.lock"
enable-cache: true
python-version: ${{ matrix.python-version }}

- name: Install Poetry
uses: Gr1N/setup-poetry@v9

- name: Install library and dependencies
run: |
poetry run pip install --upgrade pip setuptools
poetry install --with tests
run: uv sync --frozen

- name: Run Tox (Pytest + Coverage)
run: |
poetry run tox
run: uv run tox
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PLATFORM: ${{ matrix.os }}
Expand All @@ -75,12 +81,23 @@ jobs:

- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0 # Fetch all history for versioning
fetch-tags: true # Fetch tags for versioning

- name: Publish distribution 📦 to Test PyPI
uses: JRubics/poetry-publish@v2.1
continue-on-error: true
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
ignore_dev_requirements: 'yes'
pypi_token: ${{ secrets.TEST_PYPI_PASSWORD }}
repository_name: 'testpypi'
repository_url: 'https://test.pypi.org/legacy/'
cache-dependency-glob: "uv.lock"
enable-cache: true

- name: Build release
run: uv build

- name: Publish test release 📦 to Test PyPI
continue-on-error: true
run: uv publish
env:
UV_PUBLISH_URL: https://test.pypi.org/legacy/
UV_PUBLISH_CHECK_URL: https://test.pypi.org/simple/
UV_PUBLISH_TOKEN: ${{ secrets.TEST_PYPI_PASSWORD }}
Loading
Loading