Skip to content

Commit

Permalink
Run tests with all PyPy versions locally
Browse files Browse the repository at this point in the history
PyPy 7.3.9 added `pypy3.x.exe` for Windows packages and it's now possible to do this on every OS (was already possible on Linux & macOS).
This also allows to simplify the GHA test workflow.
  • Loading branch information
mayeut committed Apr 10, 2022
1 parent 71c8e12 commit 153ce6b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/test.yml
Expand Up @@ -42,13 +42,8 @@ jobs:

- name: Run nox
run: |
python -m nox --error-on-missing-interpreters -s tests-${{ matrix.python_version }}
# Need to fix-up PyPy. This can be removed once https://github.com/actions/setup-python/issues/346 lands.
INTERPRETER=${{ matrix.python_version }}
INTERPRETER=${INTERPRETER/-/} # remove the first '-' in "pypy-X.Y" -> "pypyX.Y" to match executable name
python -m nox --error-on-missing-interpreters -s tests-${INTERPRETER}
shell: bash
if: ${{ ! startsWith( matrix.python_version, 'pypy' ) }}

# Binary is named 'pypy3', but setup-python specifies it as 'pypy-3.x'.
- name: Run nox for pypy3
run: |
python -m nox --error-on-missing-interpreters -s tests-pypy3
shell: bash
if: ${{ startsWith( matrix.python_version, 'pypy' ) }}
2 changes: 1 addition & 1 deletion noxfile.py
Expand Up @@ -21,7 +21,7 @@
nox.options.reuse_existing_virtualenvs = True


@nox.session(python=["3.7", "3.8", "3.9", "3.10", "pypy3"])
@nox.session(python=["3.7", "3.8", "3.9", "3.10", "pypy3.7", "pypy3.8", "pypy3.9"])
def tests(session):
def coverage(*args):
session.run("python", "-m", "coverage", *args)
Expand Down

0 comments on commit 153ce6b

Please sign in to comment.