Merge pull request #119 from rapidpro/update-deps #349
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 | |
| strategy: | |
| matrix: | |
| python-version: ["3.12.x", "3.13.x", "3.14.x"] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Install Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Initialize environment | |
| run: uv sync --locked --all-groups | |
| - name: Run ruff format check | |
| run: uv run ruff format --check 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@v5 | |
| 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 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Install Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12.x" | |
| - name: Publish release | |
| run: | | |
| python -m pip install -U pip uv | |
| uv build | |
| uv publish --token ${{ secrets.PYPI_TOKEN }} |