diff --git a/.github/workflows/empty b/.github/workflows/empty deleted file mode 100644 index e69de29bb..000000000 diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml new file mode 100644 index 000000000..e57189a01 --- /dev/null +++ b/.github/workflows/tox.yml @@ -0,0 +1,58 @@ +name: tox + +on: [pull_request, push] + +jobs: + tox: + strategy: + fail-fast: false + matrix: + python-version: [ + "2.7", + "3.5", + "3.6", + "3.7", + "3.8", + "3.9", + "3.10", + "3.11", + "3.12", + "3.13-dev", + "pypy-2.7", + "pypy-3.10", + ] + os: [ubuntu-latest, windows-latest, macos-latest] + exclude: + - python-version: "2.7" + os: "ubuntu-latest" + - python-version: "2.7" + os: "windows-latest" + - python-version: "2.7" + os: "macos-latest" + - python-version: "3.5" + os: "ubuntu-latest" + - python-version: "3.6" + os: "ubuntu-latest" + include: + - python-version: "2.7" + os: "ubuntu-20.04" + - python-version: "3.5" + os: "ubuntu-20.04" + - python-version: "3.6" + os: "ubuntu-20.04" + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - if: ${{ matrix.python-version == '2.7' }} + run: | + sudo apt-get install python-is-python2 + curl -sSL https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py + python get-pip.py + name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }} + - if: ${{ matrix.python-version != '2.7' }} + name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - run: python -m pip install --disable-pip-version-check --upgrade tox + - run: python -m tox -e py diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 890f584a7..000000000 --- a/.travis.yml +++ /dev/null @@ -1,53 +0,0 @@ -os: linux -dist: focal -language: python -python: -- 2.7 -- 3.5 -- 3.6 -- 3.7 -- 3.8 -- &mainstream_python 3.9 -- nightly -- pypy3 -install: -- pip install --upgrade --force-reinstall "setuptools; python_version != '3.3'" "setuptools < 40; python_version == '3.3'" -- pip uninstall --yes six || true -- pip install --upgrade --force-reinstall --ignore-installed -e . -- pip install "pytest==4.6.9; python_version != '3.3'" "pytest==2.9.2; python_version == '3.3'" "typing; python_version < '3'" -- &py_pkg_list pip list --format=columns || pip list -script: -- py.test -- echo Checking whether installation flow is not broken... -- pip uninstall --yes six || true -- pip install --ignore-installed . -- *py_pkg_list -jobs: - fast_finish: true - include: - - python: 3.3 - dist: trusty - - python: 3.4 - dist: trusty - - python: pypy - dist: trusty - - stage: upload new version of python package to PYPI (only for tagged commits) - python: *mainstream_python - install: skip - script: skip - deploy: - provider: pypi - on: - tags: true - all_branches: true - python: *mainstream_python - user: __token__ - distributions: "sdist bdist_wheel" - password: - secure: "F83KFmQnpBcR/BD7tBjJcmchvvoxYjIB0EDmDKEM+Rq1SJUH0qtYZlMJ0H4S8sTeY4+h26Ssfg5+oe9SqS5AkEMLFVM2lDcFtIXNR9bIvsXjkKsdxIWZJJ+Vl7EmW+ND/oj9IWnHOvaPr6F1YQqOuP2LfrDsoZ+4wo4X+UCC8xCGCaAIliPIt6y7U3ENeCQJTwUc93eDMZrEROmWAwsxF54a13CIkbTWe+S3iEp949MaNBWx2f9XNi7Gidk2gKUKordK0MXiO7+DcrQdiCAtPryqqNKR/JjZ66P9eK1A2VWyk65/5E8+OJeexuSlHGg52HKoXU2BPIkzgcaSjt79WQKVKJzYi2iD0Bd/9/RKrnq8+GVd0yT5IJV5OhwcpT0ScPs/9pAZ1mSEufx1FtXN61ujs2VEuleSQAWBiNGXsRQNCzVxgfatkUTNMjB0jxUzNay5CFrMlo5AVWBcdByhUto3szV/lxLj7arM48GHXaf+5MXhaELU8L2pTpJoQ8Rdj+Tx5HbhJ+wWF6EyT919prB2/6fM4d/MHIuHfJkCasYZSvhamGnTBzxxH9Fv7l18FyrBXF+Rz65mXVkUlxFMICSMWRJWEb4I2KWK1bsxCFy+o38TMeije+1nbvKVRKbLMn6mbXfBb/wfLTNogHFXrlR5VcugcP079dqR9O3iV4M=" - -cache: - pip: true -after_failure: -- echo "Here's a list of installed Python packages:" -- *py_pkg_list diff --git a/test_six.py b/test_six.py index 2fe78eefc..b4159174b 100644 --- a/test_six.py +++ b/test_six.py @@ -231,6 +231,7 @@ def test_map(): assert six.advance_iterator(map(lambda x: x + 1, range(2))) == 1 +@pytest.mark.skipif("sys.platform == 'win32'", reason="TODO: fix on Windows") def test_getoutput(): from six.moves import getoutput output = getoutput('echo "foo"') diff --git a/tox.ini b/tox.ini index a1e346762..c0390fef9 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist=py27,py33,py34,py35,py36,py37,py38,pypy,flake8 +envlist=py27,py35,py36,py37,py38,py39,py310,py311,py312,py313,pypy,pypy3,flake8 [testenv] deps= pytest