Switch to use uv python package manager #312
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| 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", "3.11", "3.12", "3.13"] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Initialize environment | |
| run: uv sync --locked --all-extras --dev | |
| - name: Run black | |
| run: uv run black temba_client | |
| - name: Run ruff | |
| run: uv run ruff check temba_client | |
| - name: Run isort | |
| run: uv run isort temba_client | |
| - name: Run tests | |
| run: uv run nose2 -C --coverage temba_client --coverage-report term --coverage-report xml | |
| - name: Upload coverage | |
| if: success() | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: true | |
| release: | |
| name: Release | |
| 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: Publish release | |
| run: | | |
| python -m pip install -U pip uv | |
| uv build | |
| uv publish --token ${{ secrets.PYPI_TOKEN }} |