Skip to content

Commit 979be38

Browse files
authored
Add CI for Python 3.10, manylinux2, musllinux1 and OpenSUSE Tumbleweed (xmlsec#225)
* add CI for python 3.10 Signed-off-by: oleg.hoefling <[email protected]> * skip 3.6 and 3.7 builds for tumbleweed since python versions not available in repo Signed-off-by: oleg.hoefling <[email protected]> * build for manylinux2_24 soabi Signed-off-by: oleg.hoefling <[email protected]> * try building for musllinux1_1 soabi Signed-off-by: oleg.hoefling <[email protected]> * fix wheel selection for auditwheel repair Signed-off-by: oleg.hoefling <[email protected]> * use plain parametrization in constants tests instead of hypothesis Signed-off-by: oleg.hoefling <[email protected]> * battle zypper Signed-off-by: oleg.hoefling <[email protected]> * battle zypper Signed-off-by: oleg.hoefling <[email protected]> * battle zypper Signed-off-by: oleg.hoefling <[email protected]> * battle zypper Signed-off-by: oleg.hoefling <[email protected]> Signed-off-by: oleg.hoefling <[email protected]>
1 parent 87fb5aa commit 979be38

File tree

7 files changed

+57
-16
lines changed

7 files changed

+57
-16
lines changed

.appveyor.yml

+4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ environment:
1212
python_version: 3.9.13
1313
- python: 39-x64
1414
python_version: 3.9.13
15+
- python: 310
16+
python_version: 3.10.6
17+
- python: 310-x64
18+
python_version: 3.10.6
1519

1620
install:
1721
- ps: |

.github/workflows/macosx.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jobs:
55
runs-on: macos-latest
66
strategy:
77
matrix:
8-
python: [3.5, 3.6, 3.7, 3.8, 3.9]
8+
python: [3.5, 3.6, 3.7, 3.8, 3.9, "3.10"]
99
steps:
1010
- uses: actions/checkout@v3
1111
- name: Setup Python

.github/workflows/manylinux2010.yml renamed to .github/workflows/manylinux.yml

+16-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
1-
name: manylinux2010
1+
name: manylinux
22
on: [push, pull_request]
33
jobs:
4-
manylinux2010_x86_64:
4+
pep513:
55
runs-on: ubuntu-latest
6-
container: quay.io/pypa/manylinux2010_x86_64
76
strategy:
87
matrix:
9-
python-abi: [cp36-cp36m, cp37-cp37m, cp38-cp38, cp39-cp39]
8+
python-abi: [cp36-cp36m, cp37-cp37m, cp38-cp38, cp39-cp39, cp310-cp310]
9+
image:
10+
- manylinux2010_x86_64
11+
- manylinux_2_24_x86_64
12+
- musllinux_1_1_x86_64
13+
exclude:
14+
- image: manylinux2010_x86_64
15+
python-abi: cp310-cp310
16+
- image: manylinux2010_i686
17+
python-abi: cp310-cp310
18+
container: quay.io/pypa/${{ matrix.image }}
1019
steps:
1120
- uses: actions/checkout@v1
1221
- name: Install build dependencies
@@ -23,13 +32,13 @@ jobs:
2332
PYXMLSEC_STATIC_DEPS: true
2433
run: |
2534
/opt/python/${{ matrix.python-abi }}/bin/python -m build
26-
- name: Label manylinux2010_x86_64 wheel
35+
- name: Label manylinux wheel
2736
run: |
2837
ls -la dist/
2938
auditwheel show dist/xmlsec-${{ env.PKGVER }}-${{ matrix.python-abi }}-linux_x86_64.whl
3039
auditwheel repair dist/xmlsec-${{ env.PKGVER }}-${{ matrix.python-abi }}-linux_x86_64.whl
31-
ls -l wheelhouse/
32-
auditwheel show wheelhouse/xmlsec-${{ env.PKGVER }}-${{ matrix.python-abi }}-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
40+
ls -la wheelhouse/
41+
auditwheel show wheelhouse/xmlsec-${{ env.PKGVER }}-${{ matrix.python-abi }}-*${{ matrix.image }}*.whl
3342
- name: Install test dependencies
3443
run: |
3544
/opt/python/${{ matrix.python-abi }}/bin/pip install --upgrade -r requirements-test.txt
+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: opensuse-tumbleweed
2+
on: [push, pull_request]
3+
jobs:
4+
tumbleweed:
5+
runs-on: ubuntu-latest
6+
container: opensuse/tumbleweed
7+
strategy:
8+
matrix:
9+
python-version: ["3.8", "3.9", "3.10"]
10+
steps:
11+
- uses: actions/checkout@v1
12+
- name: Install build dependencies
13+
run: |
14+
zypper -n install -t pattern devel_basis
15+
PKGVER_NO_DOT=$(tr -d '.' <<< ${{ matrix.python-version }})
16+
zypper -n install git libxmlsec1-openssl1 xmlsec1-openssl-devel python${PKGVER_NO_DOT}-devel python${PKGVER_NO_DOT}-pip
17+
python${{ matrix.python-version }} -m venv .venv
18+
.venv/bin/python -m pip install --upgrade pip setuptools wheel
19+
- name: Build linux_x86_64 wheel
20+
run: |
21+
.venv/bin/python setup.py bdist_wheel
22+
rm -rf build/
23+
- name: Install test dependencies
24+
run: |
25+
.venv/bin/python -m pip install --upgrade -r requirements-test.txt
26+
.venv/bin/python -m pip install xmlsec --only-binary=xmlsec --no-index --find-links=dist/
27+
- name: Run tests
28+
run: |
29+
.venv/bin/python -m pytest -v --color=yes

.github/workflows/sdist.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ jobs:
55
runs-on: ubuntu-latest
66
steps:
77
- uses: actions/checkout@v3
8-
- name: Set up Python 3.9
8+
- name: Set up Python 3.10
99
uses: actions/setup-python@v4
1010
with:
11-
python-version: 3.9
11+
python-version: "3.10"
1212
- name: Install build dependencies
1313
run: |
1414
pip install --upgrade pip setuptools wheel

requirements-test.txt

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
-r requirements.txt
22
pytest>=4.6.9
3-
hypothesis
43
lxml-stubs

tests/test_constants.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Test constants from :mod:`xmlsec.constants` module."""
22

3-
from hypothesis import given, strategies
3+
import pytest
44

55
import xmlsec
66

@@ -18,25 +18,25 @@ def _constants(typename):
1818
)
1919

2020

21-
@given(transform=strategies.sampled_from(_constants('__Transform')))
21+
@pytest.mark.parametrize('transform', _constants('__Transform'), ids=repr)
2222
def test_transform_str(transform):
2323
"""Test string representation of ``xmlsec.constants.__Transform``."""
2424
assert str(transform) == '{}, {}'.format(transform.name, transform.href)
2525

2626

27-
@given(transform=strategies.sampled_from(_constants('__Transform')))
27+
@pytest.mark.parametrize('transform', _constants('__Transform'), ids=repr)
2828
def test_transform_repr(transform):
2929
"""Test raw string representation of ``xmlsec.constants.__Transform``."""
3030
assert repr(transform) == '__Transform({!r}, {!r}, {})'.format(transform.name, transform.href, transform.usage)
3131

3232

33-
@given(keydata=strategies.sampled_from(_constants('__KeyData')))
33+
@pytest.mark.parametrize('keydata', _constants('__KeyData'), ids=repr)
3434
def test_keydata_str(keydata):
3535
"""Test string representation of ``xmlsec.constants.__KeyData``."""
3636
assert str(keydata) == '{}, {}'.format(keydata.name, keydata.href)
3737

3838

39-
@given(keydata=strategies.sampled_from(_constants('__KeyData')))
39+
@pytest.mark.parametrize('keydata', _constants('__KeyData'), ids=repr)
4040
def test_keydata_repr(keydata):
4141
"""Test raw string representation of ``xmlsec.constants.__KeyData``."""
4242
assert repr(keydata) == '__KeyData({!r}, {!r})'.format(keydata.name, keydata.href)

0 commit comments

Comments
 (0)