From 16694a978d81e1d5a7cd0b07d92937591310400d Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Sat, 12 Dec 2020 11:52:37 -0300 Subject: [PATCH 1/6] Pass PRE_COMMIT_HOME to reuse local cache --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index 3774b08a..af7aa4f3 100644 --- a/tox.ini +++ b/tox.ini @@ -24,6 +24,7 @@ commands = [testenv:linting] skip_install = True usedevelop = True +passenv = PRE_COMMIT_HOME deps = pre-commit commands = pre-commit run --all-files --show-diff-on-failure From 3fb369c8ac1b7514cc770ae193daec7ead24569e Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Sat, 12 Dec 2020 11:52:47 -0300 Subject: [PATCH 2/6] Fix linting --- .github/workflows/main.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index df2735ba..4e273197 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,16 +10,16 @@ jobs: strategy: fail-fast: false matrix: - tox_env: - - "py35-pytestlatest" - - "py36-pytestlatest" - - "py37-pytestlatest" - - "py38-pytestlatest" - - "py39-pytestlatest" - - "py38-pytestmaster" - - "py38-psutil" + tox_env: + - "py35-pytestlatest" + - "py36-pytestlatest" + - "py37-pytestlatest" + - "py38-pytestlatest" + - "py39-pytestlatest" + - "py38-pytestmaster" + - "py38-psutil" - "linting" - + os: [ubuntu-latest, windows-latest] include: - tox_env: "py35-pytestlatest" From b3a1bf3c2e8c46c7f07d3be34f66f704397c2076 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Sat, 12 Dec 2020 11:58:41 -0300 Subject: [PATCH 3/6] Fix test_warning_captured_deprecated_in_pytest_6 The test was failing because *other* warnings were being triggered on the master node. This makes the test more reliable by checking only that the warning from the worker node is not emitted. Fix #601 --- testing/acceptance_test.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/testing/acceptance_test.py b/testing/acceptance_test.py index 48ed35f9..b71d1d94 100644 --- a/testing/acceptance_test.py +++ b/testing/acceptance_test.py @@ -772,19 +772,23 @@ def test_warning_captured_deprecated_in_pytest_6(self, testdir): testdir.makeconftest( """ - def pytest_warning_captured(): - assert False, "this hook should not be called in this version" + def pytest_warning_captured(warning_message): + if warning_message == "my custom worker warning": + assert False, ( + "this hook should not be called from workers " + "in this version: {}" + ).format(warning_message) """ ) testdir.makepyfile( """ import warnings def test(): - warnings.warn("custom warning") + warnings.warn("my custom worker warning") """ ) result = testdir.runpytest("-n1") - result.stdout.fnmatch_lines(["* 1 passed in *"]) + result.stdout.fnmatch_lines(["*1 passed*"]) result.stdout.no_fnmatch_line("*this hook should not be called in this version") @pytest.mark.parametrize("n", ["-n0", "-n1"]) From 00b0464d4b00339345f03b774f7d48ed9f99dc8e Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Sat, 12 Dec 2020 12:01:16 -0300 Subject: [PATCH 4/6] Remove travis and appveyor configs --- .appveyor.yml | 21 ----------------- .travis.yml | 64 --------------------------------------------------- 2 files changed, 85 deletions(-) delete mode 100644 .appveyor.yml delete mode 100644 .travis.yml diff --git a/.appveyor.yml b/.appveyor.yml deleted file mode 100644 index 667bf4ae..00000000 --- a/.appveyor.yml +++ /dev/null @@ -1,21 +0,0 @@ -environment: - matrix: - - TOXENV: "py35-pytestlatest" - - TOXENV: "py36-pytestlatest" - - TOXENV: "py37-pytestlatest" - - TOXENV: "py38-pytestlatest" - - TOXENV: "py38-pytestmaster" - - TOXENV: "py38-psutil" - -install: - - C:\Python38\python -m pip install -U pip setuptools virtualenv - - C:\Python38\python -m pip install -U tox setuptools_scm - -build: false # Not a C# project, build stuff at the test step instead. - -test_script: - - C:\Python38\python -m tox - -# We don't deploy anything on tags with AppVeyor, we use Travis instead, so we -# might as well save resources -skip_tags: true diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9f728eb2..00000000 --- a/.travis.yml +++ /dev/null @@ -1,64 +0,0 @@ -dist: xenial -language: python - -notifications: - irc: - channels: - - 'chat.freenode.net#pytest' - on_success: change - on_failure: change - skip_join: true - email: - - pytest-commit@python.org - -install: - - pip install -U pip setuptools - - pip install tox setuptools_scm -script: tox - -stages: - - baseline - - test - - name: deploy - if: repo = pytest-dev/pytest-xdist AND tag IS present - -jobs: - include: - - stage: baseline - python: '3.7' - env: TOXENV=linting - cache: - directories: - - $HOME/.cache/pre-commit - - python: '3.8' - env: TOXENV=py38-pytestlatest - - - stage: test - python: "3.5" - env: TOXENV=py35-pytestlatest - - python: "3.6" - env: TOXENV=py36-pytestlatest - - python: "3.7" - env: TOXENV=py37-pytestlatest - - python: "3.9-dev" - env: TOXENV=py39-pytestlatest - - python: "3.8" - env: TOXENV=py38-pytestmaster - - python: "3.8" - env: TOXENV=py38-psutil - - - stage: deploy - python: '3.8' - env: - install: pip install -U setuptools setuptools_scm - script: skip - deploy: - provider: pypi - user: ronny - distributions: sdist bdist_wheel - skip_upload_docs: true - password: - secure: cxmSDho5d+PYKEM4ZCg8ms1P4lzhYkrw6fEOm2HtTcsuCyY6aZMSgImWAnEYbJHSkdzgcxlXK9UKJ9B0YenXmBCkAr7UjdnpNXNmkySr0sYzlH/sfqt/dDATCHFaRKxnkOSOVywaDYhT9n8YudbXI77pXwD12i/CeSSJDbHhsu0JYUfAcb+D6YjRYoA2SEGCnzSzg+gDDfwXZx4ZiODCGLVwieNp1klCg88YROUE1BaYYNuUOONvfXX8+TWowbCF6ChH1WL/bZ49OStEYQNuYxZQZr4yClIqu9VJbchrU8j860K9ott2kkGTgfB/dDrQB/XncBubyIX9ikzCQAmmBXWAI3eyvWLPDk2Jz7kW2l2RT7syct80tCq3JhvQ1qdwr5ap7siocTLgnBW0tF4tkHSTFN3510fkc43npnp6FThebESQpnI24vqpwJ9hI/kW5mYi014Og2E/cpCXnz2XO8iZPDbqAMQpDsqEQoyhfGNgPTGp4K30TxRtwZBI5hHhDKnnR16fXtRgt1gYPvz/peUQvvpOm4JzIzGXPzluuutpnCBy75v5+oiwT3YRrLL/Meims9FtDDXL3qQubAE/ezIOOpm0N5XXV8DxIom8EN71yq5ab1tqhM+tBX7owRjy4FR4If2Q8feBdmTuh26DIQt/y+qSG8VkB9Sw/JCjc7c= - on: - tags: true - repo: pytest-dev/pytest-xdist From cf45eab9771ee271f8ec3eb4d33e23c914c70126 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Sat, 12 Dec 2020 12:02:17 -0300 Subject: [PATCH 5/6] Use GHA badge in README --- README.rst | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/README.rst b/README.rst index 61c16b54..ed93b7cd 100644 --- a/README.rst +++ b/README.rst @@ -11,13 +11,8 @@ :alt: Python versions :target: https://pypi.python.org/pypi/pytest-xdist -.. image:: https://travis-ci.org/pytest-dev/pytest-xdist.svg?branch=master - :alt: Travis CI build status - :target: https://travis-ci.org/pytest-dev/pytest-xdist - -.. image:: https://ci.appveyor.com/api/projects/status/56eq1a1avd4sdd7e/branch/master?svg=true - :alt: AppVeyor build status - :target: https://ci.appveyor.com/project/pytestbot/pytest-xdist +.. image:: https://github.com/pytest-dev/pytest-xdist/workflows/build/badge.svg + :target: https://github.com/pytest-dev/pytest-xdist/actions .. image:: https://img.shields.io/badge/code%20style-black-000000.svg :target: https://github.com/ambv/black From db896a9d337c503d64b5620a5d5087c17484b81e Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Sat, 12 Dec 2020 12:06:33 -0300 Subject: [PATCH 6/6] tox linting env expects Python 3.7 --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4e273197..58bc29ca 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -37,7 +37,7 @@ jobs: - tox_env: "py38-psutil" python: "3.8" - tox_env: "linting" - python: "3.8" + python: "3.7" steps: - uses: actions/checkout@v1