Skip to content
Open
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
42 changes: 17 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,34 @@ on: [push, pull_request]
jobs:
test:
name: Test
runs-on: ubuntu-latest
container:
image: python:${{ matrix.python-version }}-bookworm
strategy:
matrix:
python-version: ["3.10.x", "3.11.x", "3.12.x", "3.13.x"]
runs-on: ubuntu-latest
python-version: ["3.10", "3.11", "3.12", "3.13"]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-in-project: true
- name: Install uv
uses: astral-sh/setup-uv@v7

- name: Initialize environment
run: poetry install
run: uv sync --locked --all-groups

- name: Run black
run: poetry run black temba_client
run: uv run black temba_client

- name: Run ruff
run: poetry run ruff check temba_client
run: uv run ruff check temba_client

- name: Run isort
run: poetry run isort temba_client
run: uv run isort temba_client

- name: Run tests
run: poetry run nose2 -C --coverage temba_client --coverage-report term --coverage-report xml
run: uv run nose2 -C --coverage temba_client --coverage-report term --coverage-report xml

- name: Upload coverage
if: success()
Expand All @@ -47,18 +43,14 @@ jobs:
needs: [test]
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
container:
image: python:3.10-bookworm
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.10.x"

- name: Publish release
run: |
python -m pip install -U pip poetry
poetry build
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
poetry publish
python -m pip install -U pip uv
Copy link

Copilot AI Dec 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The release job installs uv via pip but doesn't use the setup-uv action like the test job does. For consistency and to follow best practices, consider using the astral-sh/setup-uv action here as well. If uv is installed via pip, there may be potential version mismatches or unexpected behavior compared to using the official setup action. Additionally, the release job might benefit from running 'uv sync --locked' before building to ensure a consistent build environment.

Copilot uses AI. Check for mistakes.
uv build
uv publish --token ${{ secrets.PYPI_TOKEN }}
Loading