Compare commits

...

7 commits

Author SHA1 Message Date
394de45b33
yeet 22.04 / 3.6 from the matrix 2022-09-08 09:39:55 -05:00
b6ced0a035
this also needs a 2.7 python 2022-09-08 09:36:39 -05:00
3c0cb26bac
this also needs a 2.7 python 2022-09-08 09:28:42 -05:00
4d43f53515
don't test py27 if not present 2022-09-08 09:20:16 -05:00
5a0c23c7c4
WIP 2022-09-08 08:20:30 -05:00
9c6fc3ea1f
no python2.7 on ubuntu 22.04 2022-09-08 08:19:27 -05:00
22974291fb
WIP 2022-09-08 08:15:48 -05:00
3 changed files with 32 additions and 5 deletions

View file

@ -29,13 +29,17 @@ jobs:
- pypy-3.6-v7.3.3
os:
- ubuntu-20.04
- ubuntu-22.04
- macos-12
- windows-2022
exclude:
- { os: macos-12, py: "pypy-3.6-v7.3.3" } # PyPy 3.6 does not support macOS 11/12
- { os: ubuntu-22.04, py: "3.6" } # Python 3.6 does not support Ubuntu 22.04
include:
- { os: macos-12, py: "brew@3.9" }
- { os: macos-12, py: "brew@3.8" }
- { os: macos-12, py: "brew@3.9" }
- { os: ubuntu-22.04, py: "@system" }
steps:
- name: Install OS dependencies
run: |
@ -53,11 +57,14 @@ jobs:
done
exit 1
shell: bash
- name: Setup python for tox
uses: actions/setup-python@v4
with:
python-version: "3.10"
### - name: Setup python for tox
### uses: actions/setup-python@v4
### with:
### python-version: "3.10"
### update-environment: false
### id: py310
- name: Install Python 2 for cross test
if: "matrix.os != 'ubuntu-22.04'"
uses: actions/setup-python@v4
with:
python-version: "2.7"
@ -70,7 +77,7 @@ jobs:
echo "/usr/local/opt/python@$PY/libexec/bin" >>"${GITHUB_PATH}"
shell: bash
- name: Setup python for test ${{ matrix.py }}
if: "!( startsWith(matrix.py,'brew@') || endsWith(matrix.py, '-dev') )"
if: "!( contains(matrix.py, '@') || endsWith(matrix.py, '-dev') )"
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.py }}
@ -102,6 +109,19 @@ jobs:
import os; import sys
os.rename(f".tox/.coverage.{os.environ['TOXENV']}", f".tox/.coverage.{os.environ['TOXENV']}-{sys.platform}")
shell: python
- name: upgrade setuptools to latest
run: pip install -U setuptools
- name: Run test suite
run: tox --skip-pkg-install
env:
PYTEST_ADDOPTS: "-vv --durations=20"
CI_RUN: "yes"
DIFF_AGAINST: HEAD
- name: Rename coverage report file
run: |
import os; import sys
os.rename(f".tox/.coverage.{os.environ['TOXENV']}", f".tox/.coverage.{os.environ['TOXENV']}-{sys.platform}-new-setuptools")
shell: python
- name: Upload coverage data
uses: actions/upload-artifact@v3
with:

View file

@ -1,8 +1,12 @@
import pytest
from virtualenv.activation import PythonActivator
from virtualenv.config.cli.parser import VirtualEnvOptions
from virtualenv.discovery.builtin import get_interpreter
from virtualenv.run import session_via_cli
@pytest.mark.skipif(get_interpreter("2.7", []) is None, reason="No 2.7 interpreter installed")
def test_python_activator_cross(session_app_data, cross_python, special_name_dir):
options = VirtualEnvOptions()
cli_args = [

View file

@ -26,6 +26,7 @@ from virtualenv.create.via_global_ref.builtin.cpython.cpython2 import CPython2Po
from virtualenv.create.via_global_ref.builtin.cpython.cpython3 import CPython3Posix
from virtualenv.create.via_global_ref.builtin.python2.python2 import Python2
from virtualenv.discovery.py_info import PythonInfo
from virtualenv.discovery.builtin import get_interpreter
from virtualenv.info import IS_PYPY, IS_WIN, fs_is_case_sensitive
from virtualenv.run import cli_run, session_via_cli
@ -318,6 +319,7 @@ def test_prompt_set(tmp_path, creator, prompt):
assert cfg["prompt"] == actual_prompt
@pytest.mark.skipif(get_interpreter("2.7", []) is None, reason="No 2.7 interpreter installed")
@pytest.mark.slow()
@pytest.mark.usefixtures("current_fastest")
def test_cross_major(cross_python, coverage_env, tmp_path, session_app_data):
@ -636,6 +638,7 @@ def test_python_path(monkeypatch, tmp_path, python_path_on):
assert base == extra_all
@pytest.mark.skipif(get_interpreter("2.7", []) is None, reason="No 2.7 interpreter installed")
@pytest.mark.parametrize(
("py", "pyc"),
product(