-
Notifications
You must be signed in to change notification settings - Fork 0
133 lines (124 loc) · 4.06 KB
/
Copy pathtests.yml
File metadata and controls
133 lines (124 loc) · 4.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
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@v6
- 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@v6
- 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/