Skip to content

build: switch from poetry to uv #1052

build: switch from poetry to uv

build: switch from poetry to uv #1052

Workflow file for this run

name: "Continuous integration"
on:
pull_request:
branches: [main]
push:
branches: [main]
tags: [v*]
jobs:
test:
name: "Test Python ${{ matrix.python-version }} on ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
permissions:
contents: read
id-token: write
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
include:
- os: ubuntu-22.04
python-version: "3.7"
- os: windows-latest
python-version: "3.7"
- os: macos-15-intel
python-version: "3.7"
steps:
- name: "Check out repository"
uses: actions/checkout@v6
- name: "Set up virtual environment"
uses: ./.github/actions/setup
with:
python-version: ${{ matrix.python-version }}
- name: "Run tests"
run: uv run poe test-ci
- name: "Upload coverage report"
uses: codecov/codecov-action@v5
with:
use_oidc: true
check:
name: "Lint and type checks"
runs-on: ubuntu-latest
steps:
- name: "Check out repository"
uses: actions/checkout@v6
- name: "Set up virtual environment"
uses: ./.github/actions/setup
- name: "Check types, lints, and formatting"
run: uv run poe check-ci
build-package:
name: Build package
runs-on: ubuntu-latest
needs: [test, check]
steps:
- name: "Check out repository"
uses: actions/checkout@v6
- name: "Set up virtual environment"
uses: ./.github/actions/setup
- name: "Build"
run: uv run poe build-package
- name: "Upload"
uses: actions/upload-artifact@v6
with:
name: package
path: ./dist
build-docs:
name: Build docs
runs-on: ubuntu-latest
needs: [test, check]
steps:
- name: "Check out repository"
uses: actions/checkout@v6
- name: "Set up virtual environment"
uses: ./.github/actions/setup
- name: "Build"
run: uv run poe build-docs
- name: "Upload"
uses: actions/upload-pages-artifact@v4
with:
path: ./site
deploy-package:
name: Deploy package to PyPI
runs-on: ubuntu-latest
needs: [build-package]
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
environment:
name: pypi
url: https://pypi.org/p/decoy
permissions:
id-token: write
contents: read
steps:
- name: "Check out repository"
uses: actions/checkout@v6
- name: "Download package artifact"
uses: actions/download-artifact@v7
with:
name: package
path: ./dist
- name: "Publish"
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
deploy-docs:
name: Deploy docs to GitHub Pages
runs-on: ubuntu-latest
needs: [build-docs]
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
id-token: write
pages: write
steps:
- name: Deploy
id: deployment
uses: actions/deploy-pages@v4