chore(lib): use uv, fix base class issues and lint #387
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
pull_request: | |
workflow_dispatch: | |
name: Test Python code | |
jobs: | |
pytest: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, ubuntu-latest] | |
pyversion: ['3.10', '3.11', '3.12'] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup uv | |
uses: astral-sh/setup-uv@v3 | |
with: | |
enable-cache: true | |
- name: Run Pytest | |
run: uv run --python ${{ matrix.pyversion }} --frozen --no-dev --extra tests pytest | |
- name: Upload to codecov.io | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true | |
benchmark: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
id: setup-python | |
with: | |
cache: pip | |
cache-dependency-path: uv.lock | |
- name: Setup uv | |
uses: astral-sh/setup-uv@v3 | |
- name: Install dependencies for benchmarking | |
run: uv pip install -r pyproject.toml --extra tests --python='${{ steps.setup-python.outputs.python-path }}' | |
- name: Run CodSpeed benchmarks | |
uses: CodSpeedHQ/action@v3 | |
with: | |
run: pytest tests/benchmarks --codspeed | |
markdown-link-check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Check links | |
uses: gaurav-nelson/github-action-markdown-link-check@v1 | |
with: | |
use-quiet-mode: yes | |
use-verbose-mode: yes | |
config-file: .mdlc.json |