Test typing in pipelines #192
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build primary wheels | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- v* | |
pull_request: | |
paths: | |
- '**' | |
jobs: | |
build_wheels: | |
name: Build primary wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
cibw_archs: "native" | |
- os: windows-latest | |
cibw_archs: "native" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build wheels | |
uses: pypa/cibuildwheel@v2.19.2 | |
env: | |
CIBW_ARCHS: ${{ matrix.cibw_archs }} | |
CIBW_SKIP: "cp311-* cp312-* pp*" | |
CIBW_TEST_REQUIRES: pytest typing_extensions | |
CIBW_TEST_COMMAND: > | |
python -X faulthandler {package}/test/debug.py && | |
python -X faulthandler -m pytest -p no:faulthandler -s {package} && | |
python {package}/test/typed.py | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./wheelhouse/*.whl | |
build_pure_py: | |
name: Build and test pure py wheels | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- tag: py311 | |
version: 3.11 | |
- tag: py312 | |
version: 3.12 | |
- tag: py313 | |
version: 3.13 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "${{ matrix.version }}" | |
- name: Install dependencies | |
run: pip install -U pip setuptools wheel pytest pytest-cov typing_extensions | |
- name: Build module | |
run: FROZENDICT_PURE_PY=1 python setup.py bdist_wheel | |
- name: Change tag to wheel | |
run: python -m wheel tags --python-tag=${{ matrix.tag }} --remove dist/* | |
- name: Install module | |
run: pip install dist/* | |
- name: Run tests | |
run: pytest --cov=frozendict --cov-report=term-missing --cov-branch --cov-fail-under=100 && | |
python test/typed.py | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./dist/* |