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
19 changes: 6 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,19 @@ jobs:

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

# We do not use the cache action as uv is faster than the cache action.
- name: "Install dependencies"
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
uv pip install --system --upgrade --editable .[dev]
- name: Install uv
uses: astral-sh/setup-uv@v3

- name: "Lint"
run: |
pre-commit run --all-files --hook-stage commit --verbose
pre-commit run --all-files --hook-stage push --verbose
pre-commit run --all-files --hook-stage manual --verbose
uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage commit --verbose
uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage push --verbose
uv run --all-extras --python=${{ matrix.python-version }} pre-commit run --all-files --hook-stage manual --verbose

- name: "Run tests"
run: |
pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml
uv run --all-extras --python=${{ matrix.python-version }} pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml

- name: "Upload coverage to Codecov"
uses: "codecov/codecov-action@v4"
Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,8 @@ jobs:
# https://github.com/stefanzweifel/git-auto-commit-action?tab=readme-ov-file#push-to-protected-branches
token: ${{ secrets.RELEASE_PAT }}

- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v3

- name: "Calver calculate version"
uses: StephaneBour/actions-calver@master
Expand Down Expand Up @@ -77,12 +75,11 @@ jobs:

- name: Build a binary wheel and a source tarball
run: |
# Checkout the latest tag - the one we just created.
git fetch --tags
git checkout ${{ steps.tag_version.outputs.new_tag }}
python -m pip install build check-wheel-contents
python -m build --sdist --wheel --outdir dist/ .
check-wheel-contents dist/*.whl
uv run pip install build check-wheel-contents
uv run python -m build --sdist --wheel --outdir dist/ .
uv run check-wheel-contents dist/*.whl

# We use PyPI trusted publishing rather than a PyPI API token.
# See https://github.com/pypa/gh-action-pypi-publish/tree/release/v1/?tab=readme-ov-file#trusted-publishing.
Expand Down