From 254b582524a3775da7a3d3bdb824e31f8d1803dc Mon Sep 17 00:00:00 2001 From: masklinn Date: Wed, 5 Apr 2023 19:28:12 +0200 Subject: [PATCH] Ignore sprurious cython import warning under pypy See yaml/pyyaml#688 (and possibly cython/cython#1720), doesn't look like there's really a better way to fix it than ignore the issue, but that's simple enough, as it's just an additional `-W` flag on the pytest invocation. While at it, add pypy-3.9 and convert versions array to a yaml list for better readability and diff-ability. --- .github/workflows/ci.yml | 29 +++++++++++++++++++++++++---- tox.ini | 4 +++- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 97f3854..53b93be 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,17 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12.0-alpha - 3.12", "pypy-3.8"] + python-version: + - "2.7" + - "3.6" + - "3.7" + - "3.8" + - "3.9" + - "3.10" + - "3.11" + - "3.12.0-alpha - 3.12" + - "pypy-3.8" + - "pypy-3.9" pyyaml-version: ["5.1.*", "5.4.*", "6.0.*", "6.*"] include: - python-version: 3.6 @@ -66,7 +76,17 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12.0-alpha - 3.12", "pypy-3.8"] + python-version: + - "2.7" + - "3.6" + - "3.7" + - "3.8" + - "3.9" + - "3.10" + - "3.11" + - "3.12.0-alpha - 3.12" + - "pypy-3.8" + - "pypy-3.9" include: - python-version: 3.6 os: ubuntu-20.04 @@ -84,7 +104,7 @@ jobs: python -mpip install --upgrade pip # if binary wheels are not available for the current package install libyaml # NB: cyaml is outright broken on pypy so exclude that - if ! ${{matrix.python-version == 'pypy-3.8'}}; then + if ! ${{ startsWith(matrix.python-version, 'pypy-') }}; then if ! pip download --only-binary pyyaml -rrequirements_dev.txt > /dev/null 2>&1; then sudo apt install libyaml-dev fi @@ -93,7 +113,8 @@ jobs: - name: install package in environment run: python setup.py develop - name: run tests - run: pytest -v -Werror + # + run: pytest -v -Werror -Wignore::ImportWarning - name: run doctests # pprint formatting was changed a lot in 3.5 if: ${{ matrix.python-version != '2.7' }} diff --git a/tox.ini b/tox.ini index 3267bb9..860659b 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,7 @@ [tox] -envlist = py27, py36, py37, py38, py39, py310, pypy3.8, docs, flake8, black +envlist = py27, py36, py37, py38, py39, py310, py311, + pypy3.8, pypy3.9, + docs, flake8, black skipsdist = True [testenv]