mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-06 17:59:52 +00:00
85 lines
2.1 KiB
YAML
85 lines
2.1 KiB
YAML
name: Run tests
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
create:
|
|
|
|
jobs:
|
|
test:
|
|
strategy:
|
|
matrix:
|
|
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
|
|
py: ["3.14", "3.14t", "3.13", "3.13t", "3.12", "3.11", "3.10", "3.9"]
|
|
exclude:
|
|
- os: windows-11-arm
|
|
py: "3.9"
|
|
- os: windows-11-arm
|
|
py: "3.10"
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
name: Run test with Python ${{ matrix.py }} on ${{ matrix.os }}
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.py }}
|
|
allow-prereleases: true
|
|
cache: "pip"
|
|
|
|
- name: Prepare
|
|
shell: bash
|
|
run: |
|
|
python -m pip install -U pip
|
|
python -m pip install -r requirements.txt pytest
|
|
|
|
- name: Install pytest-run-parallel under free-threading
|
|
if: contains(matrix.py, 't')
|
|
run: |
|
|
pip install pytest-run-parallel
|
|
|
|
- name: Build
|
|
shell: bash
|
|
run: |
|
|
make cython
|
|
pip install .
|
|
|
|
- name: Test (C extension)
|
|
if: ${{ ! contains(matrix.py, 't') }}
|
|
shell: bash
|
|
run: |
|
|
pytest -v test
|
|
|
|
- name: Test (pure Python fallback)
|
|
if: ${{ ! contains(matrix.py, 't') }}
|
|
shell: bash
|
|
run: |
|
|
MSGPACK_PUREPYTHON=1 pytest -v test
|
|
|
|
- name: Test (C extension) in parallel under free-threading
|
|
if: contains(matrix.py, 't')
|
|
shell: bash
|
|
run: |
|
|
pytest -v --parallel-threads=auto --iterations=20 test
|
|
|
|
- name: Test (pure Python fallback) in parallel under free-threading
|
|
if: contains(matrix.py, 't')
|
|
shell: bash
|
|
run: |
|
|
MSGPACK_PUREPYTHON=1 pytest -v --parallel-threads=auto --iterations=20 test
|
|
|
|
- name: build packages
|
|
shell: bash
|
|
run: |
|
|
pip install build
|
|
python -m build
|
|
|
|
- name: upload packages
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: dist-${{ matrix.os }}-${{ matrix.py }}
|
|
path: dist
|