mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-06 09:50:01 +00:00
49 lines
1.1 KiB
YAML
49 lines
1.1 KiB
YAML
name: Run tests
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
create:
|
|
|
|
jobs:
|
|
test:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-20.04, windows-2022, macos-10.15]
|
|
py: ["3.11-dev", "3.10", "3.9", "3.8", "3.7", "3.6"]
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
name: Run test with Python ${{ matrix.py }} on ${{ matrix.os }}
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v3
|
|
with:
|
|
python-version: ${{ matrix.py }}
|
|
cache: "pip"
|
|
|
|
- name: Build
|
|
shell: bash
|
|
run: |
|
|
pip install -r requirements.txt pytest
|
|
make cython
|
|
pip install .
|
|
|
|
- name: Test (C extension)
|
|
shell: bash
|
|
run: |
|
|
pytest -v test
|
|
|
|
- name: Test (pure Python fallback)
|
|
shell: bash
|
|
run: |
|
|
MSGPACK_PUREPYTHON=1 pytest -v test
|
|
|
|
- name: Publish Wheels to TestPyPI
|
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
|
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
with:
|
|
password: ${{ secrets.PYPI_API_TOKEN }}
|