Skip to content

Modify tests.yaml to use uv run instead of uvx #3

Modify tests.yaml to use uv run instead of uvx

Modify tests.yaml to use uv run instead of uvx #3

Workflow file for this run

name: test
on:
push: # any branch
pull_request:
branches: [main]
env:
FORCE_COLOR: 1
jobs:
test-ubuntu:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
["3.10", "3.11", "3.12", "3.13", "3.14", "3.14t", "3.15-dev"]
steps:
- uses: actions/checkout@v6.0.2
- uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
- name: Code formatting
if: ${{ matrix.python-version == '3.14' }}
run: |
uv run ruff check .
uv run ruff format --check .
- name: Typos
if: ${{ matrix.python-version == '3.14' }}
run: |
uv run typos .
- name: Unit test
run: |
uv run coverage run -m pytest tests/
- name: Type Checking
if: ${{ matrix.python-version != '3.10' }}
run: |
uv run mypy --strict src/ --platform win32
uv run mypy --strict src/ --platform linux
uv run mypy --strict src/ --platform darwin
- name: Validate README.md
if: ${{ matrix.python-version == '3.14' }}
# Ensure that the README renders correctly (required for uploading to PyPI).
run: |
uv pip install readme_renderer
python -m readme_renderer README.rst > /dev/null
- name: Run codecov
run: |
uv run codecov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}