Skip to content

feat: modernize packaging with pyproject.toml and uv #619

feat: modernize packaging with pyproject.toml and uv

feat: modernize packaging with pyproject.toml and uv #619

Workflow file for this run

name: ci
on:
pull_request:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python: ["3.10", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- name: Set up Python ${{ matrix.python }}
run: uv python install ${{ matrix.python }}
- name: Install dependencies
run: |
uv sync --python ${{ matrix.python }}
- name: Test with pytest & coverage
run: |
uv run --python ${{ matrix.python }} pytest --cov=src --cov-report term --cov-report html --cov-report xml -vv
# TODO requires activation for this repository on codecov website first.
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v3
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- name: Set up Python
run: uv python install 3.10
- name: Install dependencies
run: |
uv sync
- name: Lint with ruff
run: |
uv run ruff check .
- name: Lint with mypy
run: |
uv run mypy .
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- name: Set up Python
run: uv python install 3.10
- name: Install dependencies
run: |
uv sync
- name: Generate Reference Docs
run: |
mkdir ./docs/build
uv run ./docs/generate.sh --out=./docs/build/ --pypath=src/
- uses: actions/upload-artifact@v4
name: Upload Docs Preview
with:
name: reference-docs
path: ./docs/build/
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- name: Set up Python
run: uv python install 3.10
- name: Install dependencies
run: |
uv sync
- name: Check Formatting with ruff
run: |
uv run ruff format --check .