Repository navigation
Expand file tree
/
Copy pathpython-package-version-test.yml
More file actions
50 lines (45 loc) · 1.7 KB
/
Copy pathpython-package-version-test.yml
File metadata and controls
50 lines (45 loc) · 1.7 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
41
42
43
44
45
46
47
48
49
50
# 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 version compatibility
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
# Pinned: ruff 0.16.0 (2026-07-23) expanded the default rule set from
# 59 rules to 413, which fails this repo with ~289 findings. 0.15.22 is
# the last release with the old E4/E7/E9/F default. Unpin only together
# with an explicit `select` in pyproject.toml and the matching cleanup.
python -m pip install ruff==0.15.22 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with ruff
run: |
python -m ruff check pyreason/scripts
- name: Pytest Unit Tests with JIT Disabled
run: |
pytest tests/unit/disable_jit --tb=short -q
- name: Pytest Unit Tests with JIT Enabled
run: |
pytest tests/unit/dont_disable_jit --tb=short -q
- name: Pytest API Tests
run: |
pytest tests/api_tests --tb=short -q
- name: Pytest Functional Tests
run: |
pytest tests/functional/ --tb=short -q