Skip to content

Back to development: 3.3.1 #119

Back to development: 3.3.1

Back to development: 3.3.1 #119

Workflow file for this run

name: tests
on: [push, pull_request]
env:
PYTHONHASHSEED: 1042466059
ZOPE_INTERFACE_STRICT_IRO: 1
CFLAGS: "-Ofast -pipe -fomit-frame-pointer -march=native"
PIP_UPGRADE_STRATEGY: eager
jobs:
test:
strategy:
matrix:
python-version:
- "3.11"
- "3.12"
- "3.13"
- "3.14"
- "3.15-dev"
extras:
- "[test,docs,zodb,orjson]"
include:
# orjson 3.11.9 doesn't currently support
# being built for free-threaded python, so if we wanted
# to test there, we'd need to substitute it, most likely by
# moving it to an extra.
- python-version: "3.14t"
extras: "[test,docs,zodb]"
- python-version: "3.15t-dev"
extras: "[test,docs,zodb]"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'setup.py'
- name: Install dependencies
run: |
python -m pip install -U pip setuptools wheel
python -m pip install -U coverage
python -m pip install -v -U -e ".${{ matrix.extras }}"
- name: Disable GIL
if: ${{endsWith(matrix.python-version, 't') || endsWith(matrix.python-version, 't-dev')}}
# zope.hookable 8.2/zope.proxy 7.2 currently enables the gil
run: |
echo PYTHON_GIL=0 >> $GITHUB_ENV
- name: Test
run: |
python -m coverage run -m zope.testrunner --test-path=src --auto-color --auto-progress
PURE_PYTHON=1 coverage run -a -m zope.testrunner --test-path=src --auto-color --auto-progress
- name: Docs
if: matrix.python-version == '3.14'
# Requires orjson
run: |
coverage run -a -m sphinx -b doctest -d docs/_build/doctrees docs docs/_build/doctests
- name: Lint
if: matrix.python-version == '3.14'
run: |
python -m pip install -U pylint
pylint src
- name: Test without ZODB
run: |
python -m pip uninstall -y ZODB zope.dublincore persistent zope.container BTrees
PURE_PYTHON=1 coverage run -a -m zope.testrunner --test-path=src --auto-color --auto-progress
- name: Combine Coverage
run: |
coverage combine || true
coverage report -i || true
- name: Submit to Coveralls
uses: coverallsapp/github-action@v2
with:
parallel: true
coveralls_finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true
manylinux:
needs: test
runs-on: ubuntu-latest
# We use a regular Python matrix entry to share as much code as possible.
strategy:
matrix:
python-version: [3.14]
image:
- manylinux_2_28_x86_64
- manylinux_2_28_aarch64
# - manylinux_2_28_ppc64le
# - manylinux_2_28_s390x
- musllinux_1_2_x86_64
- musllinux_1_2_aarch64
name: ${{ matrix.image }}
steps:
- name: checkout
uses: actions/checkout@v7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
with:
platforms: all
- name: Build and test nti.externalization
env:
DOCKER_IMAGE: quay.io/pypa/${{ matrix.image }}
run: bash ./make-manylinux
- name: Store nti.externalization wheels
uses: actions/upload-artifact@v7
with:
path: wheelhouse/*whl
name: ${{ matrix.image }}_wheels.zip
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@v1.14.0
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
with:
user: __token__
password: ${{ secrets.TWINE_PASSWORD }}
skip-existing: true
packages-dir: wheelhouse/