From 6a40aab99db15c591060f8033a6e612246b0a078 Mon Sep 17 00:00:00 2001 From: Bashar Hasan Date: Sat, 28 Feb 2026 18:37:36 +0300 Subject: [PATCH 1/6] ci: migrate build system to uv and update actions - Upgrade actions/checkout and actions/setup-python to v6. - Replace pip and setup.py with astral-sh/setup-uv. - Use uv build for PEP 621 compliant builds. --- .github/workflows/cd_pypi.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cd_pypi.yml b/.github/workflows/cd_pypi.yml index 84a2ad1..b349457 100644 --- a/.github/workflows/cd_pypi.yml +++ b/.github/workflows/cd_pypi.yml @@ -19,18 +19,20 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v6 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v6 with: python-version: '3.10' - - name: Install dependencies - run: pip install -r requirements.txt - + - name: Install uv + uses: astral-sh/setup-uv@v7 + with: + enable-cache: true + - name: Build package - run: python setup.py sdist bdist_wheel + run: uv build - name: Publish package uses: pypa/gh-action-pypi-publish@release/v1 From 17f8fd2cd28a02a63f789084dd9a37cdaadd0302 Mon Sep 17 00:00:00 2001 From: Bashar Hasan Date: Sat, 28 Feb 2026 18:41:57 +0300 Subject: [PATCH 2/6] ci: modernize test workflow with uv and v6 actions. - Replace pip install with uv pip install using existing requirements.txt. - Update actions/checkout and actions/setup-python to v6. - Use astral-sh/setup-uv for optimized caching. --- .github/workflows/test.yaml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 9d443c8..e7438ba 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -16,16 +16,21 @@ jobs: python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} + + - name: Install uv + uses: astral-sh/setup-uv@v7 + with: + enable-cache: true + - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt + run: uv pip install -r requirements.txt + - name: Run tests - run: pytest + run: uv run pytest env: IPINFO_TOKEN: ${{ secrets.IPINFO_TOKEN }} From 8db2e6be559a91d108d638460d7311f7f22f6035 Mon Sep 17 00:00:00 2001 From: Bashar Hasan Date: Sat, 28 Feb 2026 18:55:29 +0300 Subject: [PATCH 3/6] fix: add --system flag and fix typo in uv pip install --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index e7438ba..034ebae 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -28,7 +28,7 @@ jobs: enable-cache: true - name: Install dependencies - run: uv pip install -r requirements.txt + run: uv pip install --system -r requirements.txt - name: Run tests run: uv run pytest From 624bbfb3680e58c370b662a5c505fed55fa9c1eb Mon Sep 17 00:00:00 2001 From: Bashar Hasan Date: Sat, 28 Feb 2026 21:34:57 +0300 Subject: [PATCH 4/6] ci: replace pypa/gh-action-pypi-publish with uv publish - Consolidated build and publish steps into uv - Leverages OIDC (Trusted Publishing) natively - Reduces workflow overhead by removing extra action steps --- .github/workflows/cd_pypi.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cd_pypi.yml b/.github/workflows/cd_pypi.yml index b349457..fabfa52 100644 --- a/.github/workflows/cd_pypi.yml +++ b/.github/workflows/cd_pypi.yml @@ -30,9 +30,12 @@ jobs: uses: astral-sh/setup-uv@v7 with: enable-cache: true - + + - name: Install dependencies + run: uv pip install --system -r requirements.txt + - name: Build package - run: uv build + run: uv build --no-build-isolation - name: Publish package - uses: pypa/gh-action-pypi-publish@release/v1 + uses: uv publish From 0fc544b053beb97ed4429a97f9576abebe747b15 Mon Sep 17 00:00:00 2001 From: Bashar Hasan Date: Sat, 28 Feb 2026 21:52:07 +0300 Subject: [PATCH 5/6] fix: replace uses with run typo in cd_pypi.yml --- .github/workflows/cd_pypi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cd_pypi.yml b/.github/workflows/cd_pypi.yml index fabfa52..cc0fde0 100644 --- a/.github/workflows/cd_pypi.yml +++ b/.github/workflows/cd_pypi.yml @@ -38,4 +38,4 @@ jobs: run: uv build --no-build-isolation - name: Publish package - uses: uv publish + run: uv publish From 783a54549fd3563957966498bf8d8dc94c160a1f Mon Sep 17 00:00:00 2001 From: Bashar Hasan Date: Mon, 2 Mar 2026 02:21:34 +0300 Subject: [PATCH 6/6] ci: optimize uv setup by pinning version and narrowing cache glob --- .github/workflows/cd_pypi.yml | 2 ++ .github/workflows/test.yaml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/cd_pypi.yml b/.github/workflows/cd_pypi.yml index cc0fde0..c825a61 100644 --- a/.github/workflows/cd_pypi.yml +++ b/.github/workflows/cd_pypi.yml @@ -29,7 +29,9 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v7 with: + version: "0.10.7" enable-cache: true + cache-dependency-glob: "requirements.txt" - name: Install dependencies run: uv pip install --system -r requirements.txt diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 034ebae..3bfb9f0 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -25,7 +25,9 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v7 with: + version: "0.10.7" enable-cache: true + cache-dependency-glob: "requirements.txt" - name: Install dependencies run: uv pip install --system -r requirements.txt