Skip to content

Commit

Permalink
Add PyPy jobs to PR CI runs (#1379)
Browse files Browse the repository at this point in the history
* Add PyPy jobs to PR CI runs

* Mark known broken tests with xfail

Related: #1375

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Use PyPy3.7 instead of 3.6 in CI

* Fix PyPy 3.7 declaration syntax

Co-authored-by: Sorin Sbarnea <ssbarnea@redhat.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
3 people committed Jun 20, 2021
1 parent 295ba86 commit d8ac360
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Expand Up @@ -87,3 +87,35 @@ jobs:
with:
file: ./coverage.xml
name: ${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.pip-version }}

pypy:
name: ${{ matrix.os }} / ${{ matrix.python-version }} / ${{ matrix.pip-version }}
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os:
- Ubuntu
- MacOS
# TODO: fix test_realistic_complex_sub_dependencies test on Windows
# - Windows
python-version:
- pypy-3.7
pip-version:
- latest
env:
PY_COLORS: 1
TOXENV: pip${{ matrix.pip-version }}
TOX_PARALLEL_NO_SPINNER: 1
steps:
- uses: actions/checkout@master
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: pip install tox
- name: Prepare test environment
run: tox --notest -p auto --parallel-live
- name: Test pip ${{ matrix.pip-version }}
run: tox
5 changes: 5 additions & 0 deletions tests/test_cli_compile.py
Expand Up @@ -11,6 +11,8 @@

from .constants import MINIMAL_WHEELS_PATH, PACKAGES_PATH

is_pypy = "__pypy__" in sys.builtin_module_names


@pytest.fixture(autouse=True)
def _temp_dep_cache(tmpdir, monkeypatch):
Expand Down Expand Up @@ -1760,6 +1762,7 @@ def test_triple_equal_pinned_dependency_is_used(

@pytest.mark.network
@pytest.mark.parametrize(("fname", "content"), METADATA_TEST_CASES)
@pytest.mark.xfail(is_pypy, reason="https://github.com/jazzband/pip-tools/issues/1375")
def test_input_formats(fake_dists, runner, make_module, fname, content):
"""
Test different dependency formats as input file.
Expand All @@ -1778,6 +1781,7 @@ def test_input_formats(fake_dists, runner, make_module, fname, content):

@pytest.mark.network
@pytest.mark.parametrize(("fname", "content"), METADATA_TEST_CASES)
@pytest.mark.xfail(is_pypy, reason="https://github.com/jazzband/pip-tools/issues/1375")
def test_one_extra(fake_dists, runner, make_module, fname, content):
"""
Test one `--extra` (dev) passed, other extras (test) must be ignored.
Expand All @@ -1798,6 +1802,7 @@ def test_one_extra(fake_dists, runner, make_module, fname, content):

@pytest.mark.network
@pytest.mark.parametrize(("fname", "content"), METADATA_TEST_CASES)
@pytest.mark.xfail(is_pypy, reason="https://github.com/jazzband/pip-tools/issues/1375")
def test_multiple_extras(fake_dists, runner, make_module, fname, content):
"""
Test passing multiple `--extra` params.
Expand Down

0 comments on commit d8ac360

Please sign in to comment.