From ea58d508577cc7285210f7be7fc3952536142e00 Mon Sep 17 00:00:00 2001 From: sangarshanan Date: Thu, 28 Nov 2019 18:35:01 +0530 Subject: [PATCH 1/9] Seperate out Cpython and add pypy test action --- .github/workflows/test.yml | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4adcd1af6..cabc27c83 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,8 +9,8 @@ on: - '**.py' jobs: - test: - name: Test Python ${{ matrix.python_version }} on ${{ matrix.os }} + test-cpython: + name: Test CPython ${{ matrix.python_version }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: @@ -36,3 +36,32 @@ jobs: run: | python -m coverage run --source packaging/ -m pytest --strict tests python -m coverage report -m --fail-under 100 + + + test-pypy: + name: Test ${{ matrix.pypy_version }} on ${{ matrix.os }} + runs-on: $ {{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macOS-latest] + pypy_version: ['pypy2', 'pypy3'] + + steps: + - uses: actions/checkout@v1 + + - uses: actions/setup-python@v1 + name: Install ${{ matrix.pypy_version }} + with: + pypy-version: ${{ matrix.pypy_version }} + architecture: x64 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install -r dev-requirements.txt + - name: Run pytest + run: | + python -m pytest --capture=no --strict + python -m coverage run --source packaging/ -m pytest --strict tests + python -m coverage report -m --fail-under 100 From 629e3f10caf2ecefb39cfa82918b42adb3cd2e40 Mon Sep 17 00:00:00 2001 From: sangarshanan Date: Fri, 29 Nov 2019 00:46:57 +0530 Subject: [PATCH 2/9] Edit workflow input from pypy-version to python-version Co-Authored-By: Brett Cannon <54418+brettcannon@users.noreply.github.com> --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cabc27c83..cf535f5ee 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -53,7 +53,7 @@ jobs: - uses: actions/setup-python@v1 name: Install ${{ matrix.pypy_version }} with: - pypy-version: ${{ matrix.pypy_version }} + python-version: ${{ matrix.pypy_version }} architecture: x64 - name: Install dependencies From 0ddc9ad3e2228646b01c03cf92c7cb16e09ae8a4 Mon Sep 17 00:00:00 2001 From: sangarshanan Date: Fri, 29 Nov 2019 00:55:06 +0530 Subject: [PATCH 3/9] Fix a silly grammar mistake for actions to run --- .github/workflows/test.yml | 2 +- packaging/utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cf535f5ee..c17edba0a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -59,7 +59,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install -r dev-requirements.txt + - name: Run pytest run: | python -m pytest --capture=no --strict diff --git a/packaging/utils.py b/packaging/utils.py index 545772f72..44f1bf987 100644 --- a/packaging/utils.py +++ b/packaging/utils.py @@ -23,7 +23,7 @@ def canonicalize_name(name): def canonicalize_version(_version): # type: (str) -> Union[Version, str] """ - This is very similar to Version.__str__, but has one subtle differences + This is very similar to Version.__str__, but has one subtle difference with the way it handles the release segment. """ From 94f0ae025cbe6bc024f7e3a94b1998e1c8138a20 Mon Sep 17 00:00:00 2001 From: sangarshanan Date: Fri, 29 Nov 2019 01:03:25 +0530 Subject: [PATCH 4/9] Install precommit hook to pass lint --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c17edba0a..44050e978 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -59,7 +59,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - + - name: Run pytest run: | python -m pytest --capture=no --strict From a83e6f9fd07a47d82280bb3debb6954879bc1b2f Mon Sep 17 00:00:00 2001 From: sangarshanan Date: Fri, 29 Nov 2019 09:40:20 +0530 Subject: [PATCH 5/9] Remove architecture and the unwanted second line --- .github/workflows/test.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 44050e978..b2a3a5fcf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -54,11 +54,9 @@ jobs: name: Install ${{ matrix.pypy_version }} with: python-version: ${{ matrix.pypy_version }} - architecture: x64 - name: Install dependencies - run: | - python -m pip install --upgrade pip + run: python -m pip install --upgrade pip - name: Run pytest run: | From 336e10c15a5559fd38a8cfd1fed9f63db6c92d03 Mon Sep 17 00:00:00 2001 From: sangarshanan Date: Sat, 30 Nov 2019 01:06:32 +0530 Subject: [PATCH 6/9] Change pytest version for windows compatibility --- .github/workflows/test.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b2a3a5fcf..586027dfe 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,7 +40,7 @@ jobs: test-pypy: name: Test ${{ matrix.pypy_version }} on ${{ matrix.os }} - runs-on: $ {{ matrix.os }} + runs-on: ${{ matrix.os }} strategy: matrix: @@ -51,14 +51,16 @@ jobs: - uses: actions/checkout@v1 - uses: actions/setup-python@v1 - name: Install ${{ matrix.pypy_version }} + name: Install Python ${{ matrix.pypy_version }} with: python-version: ${{ matrix.pypy_version }} - name: Install dependencies - run: python -m pip install --upgrade pip + run: | + python -m pip install --upgrade pip + python -m pip install coverage pretend pytest==4.6.5 - - name: Run pytest + - name: Test coverage run: | python -m pytest --capture=no --strict python -m coverage run --source packaging/ -m pytest --strict tests From c5d5b89b72d87a9176cafeec29c817bb5f8175d6 Mon Sep 17 00:00:00 2001 From: sangarshanan Date: Sat, 30 Nov 2019 01:37:26 +0530 Subject: [PATCH 7/9] Comment the pytest version issue with pypy for future fix --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 586027dfe..0a13ed55f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,7 +23,7 @@ jobs: - uses: actions/checkout@v1 - uses: actions/setup-python@v1 - name: Install Python ${{ matrix.python_version }} + name: Install ${{ matrix.python_version }} with: python-version: ${{ matrix.python_version }} @@ -56,6 +56,7 @@ jobs: python-version: ${{ matrix.pypy_version }} - name: Install dependencies + # pytest >= 5.0.0 fails with pypy3 https://github.com/pytest-dev/pytest/issues/5807 run: | python -m pip install --upgrade pip python -m pip install coverage pretend pytest==4.6.5 From ddc43851a58cccf282213fe0d222e636bb82802a Mon Sep 17 00:00:00 2001 From: sangarshanan Date: Sat, 30 Nov 2019 01:39:26 +0530 Subject: [PATCH 8/9] Remove extra python --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0a13ed55f..62ff5efec 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -51,7 +51,7 @@ jobs: - uses: actions/checkout@v1 - uses: actions/setup-python@v1 - name: Install Python ${{ matrix.pypy_version }} + name: Install ${{ matrix.pypy_version }} with: python-version: ${{ matrix.pypy_version }} From 472107fd020ed4df30c1aee42c7cc28e3a81c514 Mon Sep 17 00:00:00 2001 From: sangarshanan Date: Sat, 30 Nov 2019 01:42:24 +0530 Subject: [PATCH 9/9] Add Python to test statement --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 62ff5efec..b9de188c7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,7 +23,7 @@ jobs: - uses: actions/checkout@v1 - uses: actions/setup-python@v1 - name: Install ${{ matrix.python_version }} + name: Install Python ${{ matrix.python_version }} with: python-version: ${{ matrix.python_version }}