diff --git a/.appveyor.yml b/.appveyor.yml index 9155acc0..de17f8ba 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -12,6 +12,10 @@ environment: python_version: 3.9.13 - python: 39-x64 python_version: 3.9.13 + - python: 310 + python_version: 3.10.6 + - python: 310-x64 + python_version: 3.10.6 install: - ps: | diff --git a/.github/workflows/macosx.yml b/.github/workflows/macosx.yml index ef72fb78..4db5e306 100644 --- a/.github/workflows/macosx.yml +++ b/.github/workflows/macosx.yml @@ -5,7 +5,7 @@ jobs: runs-on: macos-latest strategy: matrix: - python: [3.5, 3.6, 3.7, 3.8, 3.9] + python: [3.5, 3.6, 3.7, 3.8, 3.9, "3.10"] steps: - uses: actions/checkout@v3 - name: Setup Python diff --git a/.github/workflows/manylinux2010.yml b/.github/workflows/manylinux.yml similarity index 75% rename from .github/workflows/manylinux2010.yml rename to .github/workflows/manylinux.yml index d1769b74..867c17ba 100644 --- a/.github/workflows/manylinux2010.yml +++ b/.github/workflows/manylinux.yml @@ -1,12 +1,21 @@ -name: manylinux2010 +name: manylinux on: [push, pull_request] jobs: - manylinux2010_x86_64: + pep513: runs-on: ubuntu-latest - container: quay.io/pypa/manylinux2010_x86_64 strategy: matrix: - python-abi: [cp36-cp36m, cp37-cp37m, cp38-cp38, cp39-cp39] + python-abi: [cp36-cp36m, cp37-cp37m, cp38-cp38, cp39-cp39, cp310-cp310] + image: + - manylinux2010_x86_64 + - manylinux_2_24_x86_64 + - musllinux_1_1_x86_64 + exclude: + - image: manylinux2010_x86_64 + python-abi: cp310-cp310 + - image: manylinux2010_i686 + python-abi: cp310-cp310 + container: quay.io/pypa/${{ matrix.image }} steps: - uses: actions/checkout@v1 - name: Install build dependencies @@ -23,13 +32,13 @@ jobs: PYXMLSEC_STATIC_DEPS: true run: | /opt/python/${{ matrix.python-abi }}/bin/python -m build - - name: Label manylinux2010_x86_64 wheel + - name: Label manylinux wheel run: | ls -la dist/ auditwheel show dist/xmlsec-${{ env.PKGVER }}-${{ matrix.python-abi }}-linux_x86_64.whl auditwheel repair dist/xmlsec-${{ env.PKGVER }}-${{ matrix.python-abi }}-linux_x86_64.whl - ls -l wheelhouse/ - auditwheel show wheelhouse/xmlsec-${{ env.PKGVER }}-${{ matrix.python-abi }}-manylinux_2_12_x86_64.manylinux2010_x86_64.whl + ls -la wheelhouse/ + auditwheel show wheelhouse/xmlsec-${{ env.PKGVER }}-${{ matrix.python-abi }}-*${{ matrix.image }}*.whl - name: Install test dependencies run: | /opt/python/${{ matrix.python-abi }}/bin/pip install --upgrade -r requirements-test.txt diff --git a/.github/workflows/opensuse-tumbleweed.yml b/.github/workflows/opensuse-tumbleweed.yml new file mode 100644 index 00000000..d8bb8113 --- /dev/null +++ b/.github/workflows/opensuse-tumbleweed.yml @@ -0,0 +1,29 @@ +name: opensuse-tumbleweed +on: [push, pull_request] +jobs: + tumbleweed: + runs-on: ubuntu-latest + container: opensuse/tumbleweed + strategy: + matrix: + python-version: ["3.8", "3.9", "3.10"] + steps: + - uses: actions/checkout@v1 + - name: Install build dependencies + run: | + zypper -n install -t pattern devel_basis + PKGVER_NO_DOT=$(tr -d '.' <<< ${{ matrix.python-version }}) + zypper -n install git libxmlsec1-openssl1 xmlsec1-openssl-devel python${PKGVER_NO_DOT}-devel python${PKGVER_NO_DOT}-pip + python${{ matrix.python-version }} -m venv .venv + .venv/bin/python -m pip install --upgrade pip setuptools wheel + - name: Build linux_x86_64 wheel + run: | + .venv/bin/python setup.py bdist_wheel + rm -rf build/ + - name: Install test dependencies + run: | + .venv/bin/python -m pip install --upgrade -r requirements-test.txt + .venv/bin/python -m pip install xmlsec --only-binary=xmlsec --no-index --find-links=dist/ + - name: Run tests + run: | + .venv/bin/python -m pytest -v --color=yes diff --git a/.github/workflows/sdist.yml b/.github/workflows/sdist.yml index 28fe79fe..fb13377a 100644 --- a/.github/workflows/sdist.yml +++ b/.github/workflows/sdist.yml @@ -5,10 +5,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Set up Python 3.9 + - name: Set up Python 3.10 uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: "3.10" - name: Install build dependencies run: | pip install --upgrade pip setuptools wheel diff --git a/requirements-test.txt b/requirements-test.txt index a2a90bbc..eb543402 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,4 +1,3 @@ -r requirements.txt pytest>=4.6.9 -hypothesis lxml-stubs diff --git a/tests/test_constants.py b/tests/test_constants.py index 689edce6..f79d19f0 100644 --- a/tests/test_constants.py +++ b/tests/test_constants.py @@ -1,6 +1,6 @@ """Test constants from :mod:`xmlsec.constants` module.""" -from hypothesis import given, strategies +import pytest import xmlsec @@ -18,25 +18,25 @@ def _constants(typename): ) -@given(transform=strategies.sampled_from(_constants('__Transform'))) +@pytest.mark.parametrize('transform', _constants('__Transform'), ids=repr) def test_transform_str(transform): """Test string representation of ``xmlsec.constants.__Transform``.""" assert str(transform) == '{}, {}'.format(transform.name, transform.href) -@given(transform=strategies.sampled_from(_constants('__Transform'))) +@pytest.mark.parametrize('transform', _constants('__Transform'), ids=repr) def test_transform_repr(transform): """Test raw string representation of ``xmlsec.constants.__Transform``.""" assert repr(transform) == '__Transform({!r}, {!r}, {})'.format(transform.name, transform.href, transform.usage) -@given(keydata=strategies.sampled_from(_constants('__KeyData'))) +@pytest.mark.parametrize('keydata', _constants('__KeyData'), ids=repr) def test_keydata_str(keydata): """Test string representation of ``xmlsec.constants.__KeyData``.""" assert str(keydata) == '{}, {}'.format(keydata.name, keydata.href) -@given(keydata=strategies.sampled_from(_constants('__KeyData'))) +@pytest.mark.parametrize('keydata', _constants('__KeyData'), ids=repr) def test_keydata_repr(keydata): """Test raw string representation of ``xmlsec.constants.__KeyData``.""" assert repr(keydata) == '__KeyData({!r}, {!r})'.format(keydata.name, keydata.href)