Skip to content
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

21 Test infrastructure #24

Merged
merged 82 commits into from
Nov 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
8520b95
First pass at tox/pytest/codecov/travis/appveyor
altendky Sep 11, 2018
1e14f6e
Add versioneer
altendky Sep 11, 2018
a29d926
Drop py37 on windows until twisted supports it; use 3.6 for dist
altendky Sep 11, 2018
55526ab
use py3.6 for dist on travis
altendky Sep 11, 2018
2d3f657
add get_version.py for AppVeyor
altendky Sep 11, 2018
60bb2ff
skip 3.5 on AppVeyor due to it being 3.5.3
altendky Sep 11, 2018
0816de0
update requirements.test.txt
altendky Sep 11, 2018
3d88a7f
print python version in codecov tox env
altendky Sep 11, 2018
a8c2cea
tidy tox.ini
altendky Sep 11, 2018
1c892f0
require tox 3.1
altendky Sep 11, 2018
bab5cc0
try again for 3.6 for dist...
altendky Sep 11, 2018
2b9f7fd
try again for appveyor
altendky Sep 11, 2018
9bdc22f
try again for appveyor... again
altendky Sep 11, 2018
58707a5
tidy appveyor.yml
altendky Sep 11, 2018
8f20f09
fix actual tests on appveyor
altendky Sep 11, 2018
b0c5de1
Add badges to README.rst
altendky Sep 26, 2018
644961c
twisted==18.9.0rc1 and py35/37 testing on AppVeyor
altendky Sep 26, 2018
8ad29a4
First pass at a circle config
altendky Nov 1, 2018
87570ed
try to fix circle templates
altendky Nov 1, 2018
2eb1ed6
again
altendky Nov 2, 2018
d03f728
Revert "again"
altendky Nov 2, 2018
702a90e
just checking
altendky Nov 2, 2018
6d13e31
virtualenv for circle
altendky Nov 2, 2018
42cefa0
$PYTHON -> python3
altendky Nov 2, 2018
1ded5e4
correct to .circleci/pyenvinstall.py
altendky Nov 2, 2018
a2b6c88
correct to python3
altendky Nov 2, 2018
0e14ff4
add missing checkout step for osx
altendky Nov 2, 2018
6ea8279
decode pyenv list
altendky Nov 2, 2018
1680077
rework aliases
altendky Nov 2, 2018
4b1aa35
fix yaml errors
altendky Nov 2, 2018
9874ae5
fix yaml errors
altendky Nov 2, 2018
0cc0c1b
fix yaml errors
altendky Nov 2, 2018
3707973
try to cache pyenv
altendky Nov 2, 2018
aa62bfc
cache brew and pyenv together
altendky Nov 2, 2018
37e9cd1
skip existing when pyenv installing
altendky Nov 2, 2018
88828bf
pyenv update
altendky Nov 2, 2018
67b1818
tray again for caching
altendky Nov 2, 2018
842cf93
and maybe cache this time
altendky Nov 2, 2018
507dfb8
Revert "pyenv update"
altendky Nov 2, 2018
ea7bf4b
this is weird
altendky Nov 2, 2018
3a23453
hmmph
altendky Nov 2, 2018
053533f
eehhh
altendky Nov 2, 2018
396303b
...
altendky Nov 2, 2018
76db4c8
,,,
altendky Nov 2, 2018
ac2fab3
just explicitly define the pyenv python version
altendky Nov 2, 2018
7f62ea7
---
altendky Nov 2, 2018
ef864f3
ugh
altendky Nov 2, 2018
e7fe00d
env vars wrong all this time
altendky Nov 2, 2018
b379ac7
once more
altendky Nov 2, 2018
0edd578
workaround
altendky Nov 2, 2018
ba16022
2.1
altendky Nov 2, 2018
90fad24
Rework .circleci/config.yml to version 2.1
altendky Nov 2, 2018
35e73da
names and environment for osx
altendky Nov 2, 2018
2594d41
take 2
altendky Nov 2, 2018
02b3ea9
add dist jobs
altendky Nov 2, 2018
7867d3b
drop useless steps indirection
altendky Nov 2, 2018
94bb6ef
$PYENV_PYTHON_VERSION -> << parameters.pyenv_python_version >>
altendky Nov 2, 2018
8901086
correct artifact path on circle
altendky Nov 2, 2018
05eb407
use specified pyenv python version directly for cache key
altendky Nov 2, 2018
b406625
Set PATH directly in environment
altendky Nov 2, 2018
5533110
separate codecov to it's own step
altendky Nov 2, 2018
104902d
correct previous
altendky Nov 2, 2018
3162ac3
Revert "correct previous"
altendky Nov 2, 2018
5a9af5d
Revert "Set PATH directly in environment"
altendky Nov 2, 2018
edeba33
Merge branch 'master' into 21-tests
altendky Nov 7, 2018
0d1fb8c
Add Circle build status badge
altendky Nov 7, 2018
0dddff3
codecov --verbose
altendky Nov 8, 2018
8d1105d
Revert "codecov --verbose"
altendky Nov 8, 2018
933e8c1
Add CIrcleCI variables to passenv
altendky Nov 8, 2018
ba6dcd5
codecov==2.0.5
altendky Nov 8, 2018
3ea8fe1
Revert "codecov==2.0.5"
altendky Nov 8, 2018
6129a4d
WIP
altendky Nov 9, 2018
ff658e4
Merge branch 'master' into 21-tests
altendky Nov 12, 2018
4dc5470
Test against both PyQt5 and PySide2
altendky Nov 12, 2018
4986afd
attempt at unique names on circle again with qtness
altendky Nov 12, 2018
0885609
take two at circle names
altendky Nov 12, 2018
309df9a
pick pyqt5 as qtness for dist
altendky Nov 12, 2018
b848601
pass through qtness
altendky Nov 12, 2018
18051a7
hacky fix for dist on circle#
altendky Nov 12, 2018
314f6f4
add missing qtness passthrough for osx
altendky Nov 12, 2018
2066759
Update requirements.test.txt
altendky Nov 29, 2018
b9fddb9
Update requirements.tox.txt
altendky Nov 29, 2018
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
190 changes: 190 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
version: 2.1

aliases:
- &parameters
parameters:
pyenv_python_version:
type: string
default: ">unspecified<"
python_version:
type: string
toxenv:
type: string
qtness:
type: string
default: ""

- &py35_arguments
name: py35
pyenv_python_version: "3.5.6"
python_version: "3.5"
toxenv: "py35"

- &py36_arguments
name: py36
pyenv_python_version: "3.6.7"
python_version: "3.6"
toxenv: "py36"

- &py37_arguments
name: py37
pyenv_python_version: "3.7.1"
python_version: "3.7"
toxenv: "py37"

- &dist_arguments
<<: *py37_arguments
toxenv: "dist"

commands:
run_prepare:
steps:
- run:
name: Prepare
command: |
python3 --version
python3 -m pip --version
python3 -m pip install -q --user --ignore-installed --upgrade virtualenv
python3 -m virtualenv venv
venv/bin/python -m pip install --upgrade pip
venv/bin/python -m pip freeze
venv/bin/python --version
venv/bin/pip --version
venv/bin/pip install tox

run_test:
steps:
- run:
name: Test
command: |
venv/bin/tox
- run:
name: Codecov
command: |
venv/bin/tox -e codecov

store_dist:
steps:
- store_artifacts:
path: dist/


executors:
linux_executor:
<<: *parameters
docker:
- image: circleci/python:<< parameters.python_version >>
environment:
TOXENV: << parameters.toxenv >>-<< parameters.qtness >>

osx_executor:
<<: *parameters
macos:
xcode: "10.0.0"
environment:
TOXENV: << parameters.toxenv >>-<< parameters.qtness >>


jobs:
linux:
<<: *parameters
executor:
name: linux_executor
python_version: << parameters.python_version >>
toxenv: << parameters.toxenv >>
qtness: << parameters.qtness >>
steps:
- checkout
- run_prepare
- run_test
- store_dist

osx:
<<: *parameters
executor:
name: osx_executor
python_version: << parameters.python_version >>
toxenv: << parameters.toxenv >>
qtness: << parameters.qtness >>
steps:
- checkout
- restore_cache:
keys:
- brew_pyenv-<< parameters.pyenv_python_version >>
- run:
name: OSX Prepare
command: |
brew install readline xz pyenv
pyenv install --skip-existing << parameters.pyenv_python_version >>
pyenv global << parameters.pyenv_python_version >>
echo 'export PATH=~/.pyenv/shims:$PATH' >> $BASH_ENV
- save_cache:
key: brew_pyenv-<< parameters.pyenv_python_version >>
paths:
- "~/.pyenv"
- "/usr/local/Homebrew"
- run_prepare
- run_test
- store_dist


workflows:
version: 2

all:
jobs:
- linux:
name: linux-dist
<<: *dist_arguments
- linux:
name: linux-py35-pyqt5
<<: *py35_arguments
qtness: pyqt5
- linux:
name: linux-py35-pyside2
<<: *py35_arguments
qtness: pyside2
- linux:
name: linux-py36-pyqt5
<<: *py36_arguments
qtness: pyqt5
- linux:
name: linux-py36-pyside2
<<: *py36_arguments
qtness: pyside2
- linux:
name: linux-py37-pyqt5
<<: *py37_arguments
qtness: pyqt5
- linux:
name: linux-py37-pyside2
<<: *py37_arguments
qtness: pyside2

- osx:
name: osx-dist
<<: *dist_arguments
- osx:
name: osx-py35-pyqt5
<<: *py35_arguments
qtness: pyqt5
- osx:
name: osx-py35-pyside2
<<: *py35_arguments
qtness: pyside2
- osx:
name: osx-py36-pyqt5
<<: *py36_arguments
qtness: pyqt5
- osx:
name: osx-py36-pyside2
<<: *py36_arguments
qtness: pyside2
- osx:
name: osx-py37-pyqt5
<<: *py37_arguments
qtness: pyqt5
- osx:
name: osx-py37-pyside2
<<: *py37_arguments
qtness: pyside2
7 changes: 7 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[run]
branch = True
source =
qt5reactor

[report]
show_missing = True
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/qt5reactor/_version.py export-subst
29 changes: 29 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
language: python

matrix:
include:
- python: 3.6
env: TOXENV=dist-
- python: 3.5
env: TOXENV=py35-pyqt5
- python: 3.5
env: TOXENV=py35-pyside2
- python: 3.6
env: TOXENV=py36-pyqt5
- python: 3.6
env: TOXENV=py36-pyside2
- python: 3.7
env: TOXENV=py37-pyqt5
dist: xenial
sudo: true
- python: 3.7
env: TOXENV=py37-pyside2
dist: xenial
sudo: true

install:
- pip install -r requirements.tox.txt

script:
- tox
- tox -e codecov
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include versioneer.py
include src/qt5reactor/_version.py
29 changes: 29 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,33 @@
Qt5Reactor
==========

|PyPI| |Pythons| |Travis| |AppVeyor| |Circle| |GitHub|


.. |PyPI| image:: https://img.shields.io/pypi/v/qt5reactor.svg
:alt: PyPI version
:target: https://pypi.org/project/qt5reactor/

.. |Pythons| image:: https://img.shields.io/pypi/pyversions/qt5reactor.svg
:alt: supported Python versions
:target: https://pypi.org/project/qt5reactor/

.. |Travis| image:: https://travis-ci.org/sunu/qt5reactor.svg?branch=master
:alt: Travis build status
:target: https://travis-ci.org/sunu/qt5reactor

.. |AppVeyor| image:: https://ci.appveyor.com/api/projects/status/50haxti1yjugdpya/branch/master?svg=true
:alt: AppVeyor build status
:target: https://ci.appveyor.com/project/sunu/qt5reactor

.. |Circle| image:: https://circleci.com/gh/sunu/qt5reactor.svg?style=svg
:alt: Circle build status
:target: https://circleci.com/gh/sunu/qt5reactor

.. |GitHub| image:: https://img.shields.io/github/last-commit/sunu/qt5reactor/master.svg
:alt: source on GitHub
:target: https://github.com/sunu/qt5reactor


Using the QtReactor
-------------------
Expand Down
34 changes: 34 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
skip_branch_with_pr: true

environment:
matrix:
- TOXENV: dist-
- TOXENV: py35-pyqt5
- TOXENV: py35-pyside2
- TOXENV: py36-pyqt5
- TOXENV: py36-pyside2
- TOXENV: py37-pyqt5
- TOXENV: py37-pyside2

# https://www.appveyor.com/docs/how-to/rdp-to-build-worker/
init:
- ps: if (Get-ChildItem Env:ENABLE_RDP -ErrorAction SilentlyContinue) {iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))} else {echo RDP not enabled}
- echo "TOXENV- %TOXENV%"

install:
- py -3.7 -m venv venv
- venv\\Scripts\\activate
- python -c "import sys; print(sys.version)"
- pip install -r requirements.tox.txt
- ps: Update-AppveyorBuild -Version "v$(python get_version.py) b$Env:APPVEYOR_BUILD_NUMBER"

build_script:
- tox
- tox -e codecov

artifacts:
- path: "dist\\*"

# https://www.appveyor.com/docs/how-to/rdp-to-build-worker/
on_finish:
- ps: if (Get-ChildItem Env:ENABLE_RDP -ErrorAction SilentlyContinue) {$blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))} else {echo RDP not enabled}
6 changes: 6 additions & 0 deletions get_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import sys

import versioneer


sys.stdout.write(versioneer.get_versions()["version"])
28 changes: 28 additions & 0 deletions requirements.test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
atomicwrites==1.2.1
attrs==18.2.0
Automat==0.7.0
constantly==15.1.0
coverage==4.5.2
decorator==4.3.0
filelock==3.0.10
greenlet==0.4.15
hyperlink==18.0.0
idna==2.7
incremental==17.5.0
more-itertools==4.3.0
pluggy==0.8.0
py==1.7.0
PyHamcrest==1.9.0
pytest==4.0.1
pytest-cov==2.6.0
pytest-twisted==1.8
-e .[test]
six==1.11.0
toml==0.10.0
tox==3.5.3
Twisted==18.9.0; platform_system != "Windows" and platform_system != "Darwin"
Twisted[osx_platform]==18.9.0; platform_system == "Darwin"
Twisted[windows_platform]==18.9.0; platform_system == "Windows"
virtualenv==16.1.0
zope.interface==4.6.0

7 changes: 7 additions & 0 deletions requirements.tox.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
filelock==3.0.10
pluggy==0.8.0
py==1.7.0
six==1.11.0
toml==0.10.0
tox==3.5.3
virtualenv==16.1.0
6 changes: 6 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[versioneer]
VCS = git
style = pep440-post
versionfile_source = src/qt5reactor/_version.py
versionfile_build = qt5reactor/_version.py
tag_prefix = v
26 changes: 22 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
import os
from setuptools import setup, find_packages

import versioneer


def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
Expand All @@ -26,16 +28,32 @@ def read(fname):

setup(
name='qt5reactor',
version='0.5',
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
license='MIT',
classifiers=classifiers,
author='Christopher R. Wood',
author_email='[email protected]',
description='Twisted Qt Integration',
long_description=read('README.rst'),
url='https://github.com/sunu/qt5reactor',
packages=find_packages(),
py_modules=['qt5reactor'],
packages=find_packages("src"),
package_dir={"": "src"},
keywords=['Qt', 'twisted'],
install_requires=['twisted']
install_requires=['twisted'],
extras_require={
"pyqt5": [
"pyqt5",
],
"pyside2": [
"pyside2",
],
"test": [
"coverage",
"pytest",
"pytest-cov",
"pytest-twisted",
"tox>=3.1",
],
},
)
Loading