Skip to content
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
59 changes: 59 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Tests

on:
push:
branches:
- master
paths-ignore:
- 'docs/**'
- '*.md'
- '*.rst'
pull_request:
branches:
- master
paths-ignore:
- 'docs/**'
- '*.md'
- '*.rst'

jobs:
tests:
name: "Python ${{ matrix.name }} on ${{ matrix.os }}"
runs-on: "${{ matrix.os }}"

strategy:
fail-fast: false
matrix:
include:
- {name: Linux, python: '3.9', os: ubuntu-latest, tox: py39}
- {name: Windows, python: '3.9', os: windows-latest, tox: py39}
# ToDo: There are errors on Mac, but I don't know why: Connection timeout or reset
# - {name: Mac, python: '3.9', os: macos-latest, tox: py39}
- {name: '3.8', python: '3.8', os: ubuntu-latest, tox: py38}
- {name: '3.7', python: '3.7', os: ubuntu-latest, tox: py37}
- {name: '3.6', python: '3.6', os: ubuntu-latest, tox: py36}
- {name: 'PyPy', python: pypy3, os: ubuntu-latest, tox: pypy3}

steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v2"
with:
python-version: ${{ matrix.python }}
- name: update pip
run: |
python -VV
python -m site
pip install -U wheel
pip install -U setuptools
python -m pip install -U pip
- name: get pip cache dir
id: pip-cache
run: echo "::set-output name=dir::$(pip cache dir)"
- name: cache pip
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: pip|${{ runner.os }}|${{ matrix.python }}|${{ hashFiles('setup.py') }}|${{ hashFiles('requirements/*.txt') }}
- run: pip install tox
- name: "Run tox targets for ${{ matrix.python }}"
run: tox -e ${{ matrix.tox }}
25 changes: 0 additions & 25 deletions .travis.yml

This file was deleted.

5 changes: 2 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ Install

Supported Python versions:

* Python 2.7
* Python >= 3.2
* PyPy and PyPy3
* Python >= 3.6
* PyPy3

**Install:**

Expand Down
8 changes: 3 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,11 @@
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy"
],
Expand Down
6 changes: 1 addition & 5 deletions tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ def get_response(self):
yield b""


class ThreadedHTTPServer(ThreadingMixIn, HTTPServer):
pass


def read_file(filename, mode="r"):
filename = os.path.join(os.path.dirname(__file__), filename)
return open(filename, mode).read()
Expand All @@ -47,7 +43,7 @@ def new_server_thread(handle_cls, port=None):
current_port += 1
test_lock.release()

server = ThreadedHTTPServer(
server = HTTPServer(
(HOST, port),
handle_cls
)
Expand Down
16 changes: 13 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
[tox]
envlist = py27,py32,py33,py34,py35,py36,pypy,pypy3
envlist = py36,py37,py38,py39,pypy3

[testenv]
deps = pytest
commands = py.test
deps =
pytest
pytest-cov
commands = pytest --cov overpy --cov-report=term-missing -v tests/

[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38
3.9: py39
pypy3: pypy3