Rely on PyPI Trusted Publisher for publishing instead of using token … #55
This file contains 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: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
Linting: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v3 | |
with: | |
enable-cache: true | |
- name: Set up Python | |
run: uv python install | |
- name: Install the project | |
run: uv sync --all-extras --dev | |
- name: Lint with ruff | |
run: | | |
make lint | |
Build: | |
runs-on: ubuntu-latest | |
# There is an issue with infinitely running tests when something fails due to failure to close the WebSocket, so we set a timeout. | |
timeout-minutes: 5 | |
strategy: | |
matrix: | |
# If we test it against too many versions, we are making unnecessary | |
# requests to the production server. | |
python-version: ["3.8", "3.10"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v3 | |
with: | |
enable-cache: true | |
- name: Set up Python ${{ matrix.python-version }} | |
run: uv python install ${{ matrix.python-version }} | |
- name: Install the project | |
run: uv sync --all-extras --dev | |
- name: Test | |
env: | |
CARTESIA_API_KEY: ${{ secrets.TESTING_CARTESIA_API_KEY }} | |
CARTESIA_TEST_DEPRECATED: "true" | |
run: | | |
make test |