Skip to content

Commit f310ccc

Browse files
committed
Run Python unit tests in multiple Python versions in CI
1 parent c18738c commit f310ccc

3 files changed

Lines changed: 386 additions & 0 deletions

File tree

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: unit_tests
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
unit_tests:
9+
name: Python ${{ matrix.py_version }} unit tests on '${{ matrix.os.name }}'
10+
runs-on: ${{ matrix.os.runner }}
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
os: [
15+
{
16+
name: linux,
17+
runner: ubuntu-latest,
18+
python_venv_activate: source .venv/bin/activate,
19+
},
20+
{
21+
name: macos,
22+
runner: macos-latest,
23+
python_venv_activate: source .venv/bin/activate,
24+
},
25+
{
26+
name: macos-intel,
27+
runner: macos-15-intel,
28+
python_venv_activate: source .venv/bin/activate,
29+
},
30+
{
31+
name: windows,
32+
runner: windows-latest,
33+
python_venv_activate: .venv/Scripts/Activate.ps1,
34+
},
35+
]
36+
py_version:
37+
- '3.4'
38+
- '3.5'
39+
- '3.6'
40+
- '3.7'
41+
- '3.8'
42+
- '3.9'
43+
- '3.10'
44+
- '3.11'
45+
- '3.12'
46+
- '3.13'
47+
- '3.14'
48+
- '3.14t'
49+
50+
steps:
51+
- name: Checkout
52+
uses: actions/checkout@main
53+
54+
- name: Print Python version
55+
run: |
56+
python3 --version
57+
58+
- name: Set up Python ${{ matrix.py_version }}
59+
uses: actions/setup-python@v6
60+
with:
61+
python-version: ${{ matrix.py_version }}
62+
63+
- name: Install uv
64+
uses: astral-sh/setup-uv@v7
65+
66+
- name: Setup Python venv
67+
run: |
68+
python3 --version
69+
uv venv --no-config -p ${{ matrix.py_version }}
70+
${{ matrix.os.python_venv_activate }}
71+
python3 --version
72+
73+
- name: Install Python dependencies
74+
run: |
75+
${{ matrix.os.python_venv_activate }}
76+
uv build --wheel
77+
pip install --force-reinstall $(find ./dist/ -name "rabbitizer-*.whl")
78+
79+
- name: Run the test
80+
run: |
81+
${{ matrix.os.python_venv_activate }}
82+
python3 tests/python/disasm_test.py

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1616
- Install the built wheels in CI to make sure they work corrently in multiple
1717
versions.
1818

19+
### Changed
20+
21+
- The minimum Python version has been lowered from 3.9 to 3.4.
22+
- CI: Python unit tests are now tested in multiple Python versions in CI.
23+
1924
## [1.14.3] - 2025-10-12
2025

2126
### Fixed

0 commit comments

Comments
 (0)