Skip to content

Move to uv + pyproject.toml #188

Move to uv + pyproject.toml

Move to uv + pyproject.toml #188

Workflow file for this run

name: "Python SDK test"
on:
pull_request:
push:
branches:
- main
jobs:
sdk-test:
runs-on: "ubuntu-22.04"
strategy:
matrix:
python_version: ["3.8", "3.10", "3.12"]
steps:
- name: "Checkout"
uses: "actions/checkout@v5"
with:
fetch-depth: 10
- name: "Set up Python"
uses: "actions/setup-python@v5"
with:
python-version: "${{ matrix.python_version }}"
- name: "Install uv and set the python version"
uses: "astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57" # v8.0.0
with:
python-version: "${{ matrix.python-version }}"
version: "0.11.2"
- name: "Run pyre"
run: |
set -o pipefail
uv run --frozen pyre | tee >(sed 's, ,:,' | awk -F: '{sub(" ", "", $5); print "::error file=" ENVIRON["PWD"] "/" $1 ",line=" $2 ",col=" $3 ",title=" $4 "::" $5}')
- name: "Run pytest"
run: "PYTHONPATH=. uv run --frozen pytest"
- name: "Run pylint"
run: "PYTHONPATH=. uv run --frozen pylint --jobs 0 --score n --msg-template='::{category} file={abspath},line={line},col={column},title={msg_id} {symbol}::{msg}' lightspark"
- name: "Run black"
run: |
set -o pipefail
uv run --frozen black --check --diff . | tee >(pipenv run ../scripts/diff2annotation.py)