Skip to content

WIP debug pyproject.toml parsing #237

WIP debug pyproject.toml parsing

WIP debug pyproject.toml parsing #237

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Python lint and tests
on:
push:
branches: ["dev"]
pull_request:
branches: ["dev"]
jobs:
lint:
runs-on: ubuntu-latest
env:
UV_LOCKED: true
UV_COMPILE_BYTECODE: true
UV_NO_EDITABLE: true
UV_NO_PROGRESS: true
UV_NO_SYNC: true
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Install uv and set the python version
id: setup-uv
uses: astral-sh/setup-uv@v6
with:
# https://docs.astral.sh/uv/guides/integration/github/#using-uv-in-github-actions
# It is considered best practice to pin to a specific uv version
version: "0.8.23"
# https://github.com/astral-sh/setup-uv?tab=readme-ov-file#enable-caching
enable-cache: true
cache-dependency-glob: uv.lock
- name: Do something if the cache was restored
if: steps.setup-uv.outputs.cache-hit == 'true'
run: echo "Cache was restored"
- name: Install the project
run: uv sync --dev
- name: Run pre-commit hooks
run: >
uv run
--no-sync
pre-commit run
--all-files
--show-diff-on-failure --color=always
test:
needs: lint
runs-on: ubuntu-latest
env:
UV_LOCKED: true
UV_COMPILE_BYTECODE: true
UV_NO_EDITABLE: true
UV_NO_PROGRESS: true
UV_NO_SYNC: true
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Install uv and set the python version
id: setup-uv
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
# https://docs.astral.sh/uv/guides/integration/github/#using-uv-in-github-actions
# It is considered best practice to pin to a specific uv version
version: "0.8.23"
# https://github.com/astral-sh/setup-uv?tab=readme-ov-file#enable-caching
enable-cache: true
cache-dependency-glob: uv.lock
- name: Do something if the cache was restored
if: steps.setup-uv.outputs.cache-hit == 'true'
run: echo "Cache was restored"
- name: Install the project
run: uv sync --dev
- name: Run tests
# For example, using `pytest`
run: uv run --no-sync pytest -m ci