Skip to content

Test with pytest from master/features #79

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 29 additions & 23 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,44 @@
sudo: false
language: python
python:
- '2.6'
- '2.7'
- '3.3'
- '3.4'
- '3.5'
- '3.6'
- pypy
- nightly

# command to install dependencies
install: "pip install -U tox"

# command to run tests
env:
matrix:
- TOXENV=py-pytest28
- TOXENV=py-pytest29
- TOXENV=py-pytest30

matrix:
include:
- python: '2.7'
env: TOXENV=check
- python: '3.6'
env: TOXENV=check
- python: '3.6'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have to say I've always found this a bit funny/redundant that we're routing through tox when Travis is really enabling the same thing via it's own job generation system. This include matrix just ends up being a big combo-list defeating the entire purpose. I think tox makes sense if you don't have a generative system built into your CI server already.

That's another thing tox doesn't support parallel jobs does it?
That's something that'd be super handy when testing locally.
I'd also be interested in using travis' stages to do docs and benchmarking runs in parallel with the regular suite.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

his include matrix just ends up being a big combo-list defeating the entire purpose. I think tox makes sense if you don't have a generative system built into your CI server already.

One reason to also use tox in this context is to avoid duplicating logic from it like dependency installation and such.

I'd also be interested in using travis' stages to do docs and benchmarking runs in parallel with the regular suite.

Actually all jobs already run in parallel, give or take Travis current work availability when the build runs.

env: TOXENV=docs
- python: '2.6'
env: TOXENV=py26-pytestrelease
- python: '2.7'
env: TOXENV=benchmark
env: TOXENV=py27-pytestrelease
- python: '3.3'
env: TOXENV=py33-pytestrelease
- python: '3.4'
env: TOXENV=py34-pytestrelease
- python: '3.5'
env: TOXENV=py35-pytestrelease
- python: '3.6'
env: TOXENV=py36-pytestrelease
- python: 'pypy'
env: TOXENV=pypy-pytestrelease
- python: 'nightly'
env: TOXENV=py37-pytestrelease
- python: '2.7'
env: TOXENV=py27-pytestmaster
- python: '2.7'
env: TOXENV=py27-pytestfeatures
- python: '3.6'
env: TOXENV=py36-pytestmaster
- python: '3.6'
env: TOXENV=py36-pytestfeatures
- python: '3.6'
env: TOXENV=benchmark

install:
- pip install -U tox

script:
- tox --recreate -e $TOXENV
- tox

notifications:
irc:
Expand Down
16 changes: 15 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
environment:
matrix:
# note: please use "tox --listenvs" to populate the build matrix below
- TOXENV: "check"
- TOXENV: "docs"
- TOXENV: "py26-pytestrelease"
- TOXENV: "py27-pytestrelease"
- TOXENV: "py34-pytestrelease"
- TOXENV: "py35-pytestrelease"
- TOXENV: "py36-pytestrelease"
- TOXENV: "pypy-pytestrelease"
- TOXENV: "py27-pytestmaster"
- TOXENV: "py27-pytestfeatures"
- TOXENV: "py36-pytestmaster"
- TOXENV: "py36-pytestfeatures"

install:
- echo Installed Pythons
Expand All @@ -18,4 +33,3 @@ build: false # Not a C# project, build stuff at the test step instead.

test_script:
- C:\Python35\python -m tox

10 changes: 6 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
[tox]
envlist=check,py{26,27,34,35,36,py}-pytest{28,29,30}
envlist=check,docs,py{26,27,34,35,36,py}-pytestrelease,py{27,36}-pytest{master,features}

[testenv]
commands=py.test {posargs:testing/}
setenv=
_PYTEST_SETUP_SKIP_PLUGGY_DEP=1
deps=
pytest28: pytest~=2.8.0
pytest29: pytest~=2.9.0
pytest30: pytest~=3.0.0
pytestrelease: pytest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 perfect

pytestmaster: git+https://github.com/pytest-dev/pytest.git@master
pytestfeatures: git+https://github.com/pytest-dev/pytest.git@features

[testenv:benchmark]
commands=py.test {posargs:testing/benchmark.py}
Expand Down