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
46 changes: 12 additions & 34 deletions .github/workflows/lint_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,54 +12,44 @@ jobs:
lint:
runs-on: ubuntu-latest

env:
UV_CACHE_DIR: /tmp/.uv-cache

steps:
- uses: actions/checkout@v4

- name: Set up uv
run: curl -LsSf https://astral.sh/uv/0.4.30/install.sh | sh
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "0.5.x"
enable-cache: true
cache-dependency-glob: "uv.lock"

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"

- name: Restore uv cache
uses: actions/cache@v4
with:
path: /tmp/.uv-cache
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
restore-keys: |
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
uv-${{ runner.os }}

- name: Install dependencies
run: uv sync --all-extras --dev

- name: Run mypy
run: uv run mypy .
if: always()

- name: Minimize uv cache
run: uv cache prune --ci

test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
fail-fast: false

env:
UV_CACHE_DIR: /tmp/.uv-cache

steps:
- uses: actions/checkout@v4

- name: Set up uv
run: curl -LsSf https://astral.sh/uv/0.4.30/install.sh | sh
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "0.5.x"
enable-cache: true
cache-dependency-glob: "uv.lock"

- name: Set up (release) Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
Expand All @@ -73,15 +63,6 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Restore uv cache
uses: actions/cache@v4
with:
path: /tmp/.uv-cache
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
restore-keys: |
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
uv-${{ runner.os }}

- name: Install dependencies
run: |
uv venv
Expand All @@ -98,9 +79,6 @@ jobs:
if-no-files-found: error
include-hidden-files: true

- name: Minimize uv cache
run: uv cache prune --ci

combine-cov:
runs-on: ubuntu-latest
needs: test
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/pypi_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,20 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up uv
run: curl -LsSf https://astral.sh/uv/0.4.30/install.sh | sh
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "0.5.x"
enable-cache: true
cache-dependency-glob: "uv.lock"

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"

- name: Build package
run: uvx --from build pyproject-build --installer uv
run: uv build

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1.10
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ repos:
- id: python-check-blanket-type-ignore
exclude: "test_type_ignore.py"
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.2
rev: v0.8.1
hooks:
- id: ruff
- repo: local
Expand Down
Loading
Loading