Merge pull request #609 from nicoddemus/gh-actions
This commit is contained in:
@@ -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
|
|
||||||
20
.github/workflows/main.yml
vendored
20
.github/workflows/main.yml
vendored
@@ -10,16 +10,16 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
tox_env:
|
tox_env:
|
||||||
- "py35-pytestlatest"
|
- "py35-pytestlatest"
|
||||||
- "py36-pytestlatest"
|
- "py36-pytestlatest"
|
||||||
- "py37-pytestlatest"
|
- "py37-pytestlatest"
|
||||||
- "py38-pytestlatest"
|
- "py38-pytestlatest"
|
||||||
- "py39-pytestlatest"
|
- "py39-pytestlatest"
|
||||||
- "py38-pytestmaster"
|
- "py38-pytestmaster"
|
||||||
- "py38-psutil"
|
- "py38-psutil"
|
||||||
- "linting"
|
- "linting"
|
||||||
|
|
||||||
os: [ubuntu-latest, windows-latest]
|
os: [ubuntu-latest, windows-latest]
|
||||||
include:
|
include:
|
||||||
- tox_env: "py35-pytestlatest"
|
- tox_env: "py35-pytestlatest"
|
||||||
@@ -37,7 +37,7 @@ jobs:
|
|||||||
- tox_env: "py38-psutil"
|
- tox_env: "py38-psutil"
|
||||||
python: "3.8"
|
python: "3.8"
|
||||||
- tox_env: "linting"
|
- tox_env: "linting"
|
||||||
python: "3.8"
|
python: "3.7"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
|
|||||||
64
.travis.yml
64
.travis.yml
@@ -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
|
|
||||||
@@ -11,13 +11,8 @@
|
|||||||
:alt: Python versions
|
:alt: Python versions
|
||||||
:target: https://pypi.python.org/pypi/pytest-xdist
|
:target: https://pypi.python.org/pypi/pytest-xdist
|
||||||
|
|
||||||
.. image:: https://travis-ci.org/pytest-dev/pytest-xdist.svg?branch=master
|
.. image:: https://github.com/pytest-dev/pytest-xdist/workflows/build/badge.svg
|
||||||
:alt: Travis CI build status
|
:target: https://github.com/pytest-dev/pytest-xdist/actions
|
||||||
: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://img.shields.io/badge/code%20style-black-000000.svg
|
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
|
||||||
:target: https://github.com/ambv/black
|
:target: https://github.com/ambv/black
|
||||||
|
|||||||
@@ -772,19 +772,23 @@ class TestWarnings:
|
|||||||
|
|
||||||
testdir.makeconftest(
|
testdir.makeconftest(
|
||||||
"""
|
"""
|
||||||
def pytest_warning_captured():
|
def pytest_warning_captured(warning_message):
|
||||||
assert False, "this hook should not be called in this version"
|
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(
|
testdir.makepyfile(
|
||||||
"""
|
"""
|
||||||
import warnings
|
import warnings
|
||||||
def test():
|
def test():
|
||||||
warnings.warn("custom warning")
|
warnings.warn("my custom worker warning")
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
result = testdir.runpytest("-n1")
|
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")
|
result.stdout.no_fnmatch_line("*this hook should not be called in this version")
|
||||||
|
|
||||||
@pytest.mark.parametrize("n", ["-n0", "-n1"])
|
@pytest.mark.parametrize("n", ["-n0", "-n1"])
|
||||||
|
|||||||
1
tox.ini
1
tox.ini
@@ -24,6 +24,7 @@ commands =
|
|||||||
[testenv:linting]
|
[testenv:linting]
|
||||||
skip_install = True
|
skip_install = True
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
|
passenv = PRE_COMMIT_HOME
|
||||||
deps =
|
deps =
|
||||||
pre-commit
|
pre-commit
|
||||||
commands = pre-commit run --all-files --show-diff-on-failure
|
commands = pre-commit run --all-files --show-diff-on-failure
|
||||||
|
|||||||
Reference in New Issue
Block a user