Skip to content
Merged
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
31 changes: 14 additions & 17 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,29 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Set PATH
run: echo "${HOME}/.local/bin" >> $GITHUB_PATH

- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4

- name: Install uv
# Pinned to a full release commit (setup-uv no longer publishes
# floating major tags). Bump deliberately. v8.2.0
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39
with:
python-version: "3.12"
enable-cache: true

- name: Install dependencies
run: |
curl -sSL https://install.python-poetry.org | python - --version 1.8.5
poetry install
run: uv sync --locked

- name: Run tests
run: |
poetry run pytest
run: uv run pytest

- name: Set version from release tag
run: uv version "$(git tag --points-at HEAD)"

- name: Build wheels
run: |
poetry version $(git tag --points-at HEAD)
poetry build
run: uv build

- name: Upload
env:
USERNAME: __token__
PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
poetry publish --username=$USERNAME --password=$PASSWORD
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: uv publish
30 changes: 9 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,36 +10,24 @@ jobs:
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- name: Set PATH
run: echo "${HOME}/.local/bin" >> $GITHUB_PATH

- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Cache pip
uses: actions/cache@v4
- name: Install uv
# Pinned to a full release commit (setup-uv no longer publishes
# floating major tags). Bump deliberately. v8.2.0
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('poetry.lock') }}-${ GITHUB_REF }
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
python-version: ${{ matrix.python-version }}
enable-cache: true

- name: Install dependencies
run: |
curl -sSL https://install.python-poetry.org | python - --version 1.8.5
poetry install
run: uv sync --locked

- name: Run tests
run: |
poetry run pytest
run: uv run pytest

- name: Build wheels
run: |
poetry build
run: uv build

build-docs:
runs-on: ubuntu-latest
Expand Down
Loading
Loading