-
Notifications
You must be signed in to change notification settings - Fork 14
40 lines (38 loc) · 1.27 KB
/
test.yaml
File metadata and controls
40 lines (38 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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"
working-directory: "lightspark"
- name: "Run ty"
working-directory: "lightspark"
run: "uv run ty check --output-format github ."
- name: "Run pytest"
run: "PYTHONPATH=. uv run pytest"
- name: "Run pylint"
run: "PYTHONPATH=. uv run pylint --jobs 0 --score n --msg-template='::{category} file={abspath},line={line},col={column},title={msg_id} {symbol}::{msg}' lightspark"
- name: "Run ruff format"
run: |
set -o pipefail
uv run --frozen ruff format --diff . | tee >(uv run --frozen ./scripts/diff2annotation.py)