Skip to content

Commit 66efb09

Browse files
authored
git - Merge pull request #89 from DinoTools/travis_to_github_actions
Travis to GitHub actions
2 parents 4957b8d + 8cec18c commit 66efb09

File tree

6 files changed

+78
-41
lines changed

6 files changed

+78
-41
lines changed

.github/workflows/ci.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths-ignore:
8+
- 'docs/**'
9+
- '*.md'
10+
- '*.rst'
11+
pull_request:
12+
branches:
13+
- master
14+
paths-ignore:
15+
- 'docs/**'
16+
- '*.md'
17+
- '*.rst'
18+
19+
jobs:
20+
tests:
21+
name: "Python ${{ matrix.name }} on ${{ matrix.os }}"
22+
runs-on: "${{ matrix.os }}"
23+
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
include:
28+
- {name: Linux, python: '3.9', os: ubuntu-latest, tox: py39}
29+
- {name: Windows, python: '3.9', os: windows-latest, tox: py39}
30+
# ToDo: There are errors on Mac, but I don't know why: Connection timeout or reset
31+
# - {name: Mac, python: '3.9', os: macos-latest, tox: py39}
32+
- {name: '3.8', python: '3.8', os: ubuntu-latest, tox: py38}
33+
- {name: '3.7', python: '3.7', os: ubuntu-latest, tox: py37}
34+
- {name: '3.6', python: '3.6', os: ubuntu-latest, tox: py36}
35+
- {name: 'PyPy', python: pypy3, os: ubuntu-latest, tox: pypy3}
36+
37+
steps:
38+
- uses: "actions/checkout@v2"
39+
- uses: "actions/setup-python@v2"
40+
with:
41+
python-version: ${{ matrix.python }}
42+
- name: update pip
43+
run: |
44+
python -VV
45+
python -m site
46+
pip install -U wheel
47+
pip install -U setuptools
48+
python -m pip install -U pip
49+
- name: get pip cache dir
50+
id: pip-cache
51+
run: echo "::set-output name=dir::$(pip cache dir)"
52+
- name: cache pip
53+
uses: actions/cache@v2
54+
with:
55+
path: ${{ steps.pip-cache.outputs.dir }}
56+
key: pip|${{ runner.os }}|${{ matrix.python }}|${{ hashFiles('setup.py') }}|${{ hashFiles('requirements/*.txt') }}
57+
- run: pip install tox
58+
- name: "Run tox targets for ${{ matrix.python }}"
59+
run: tox -e ${{ matrix.tox }}

.travis.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

README.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,8 @@ Install
3333

3434
Supported Python versions:
3535

36-
* Python 2.7
37-
* Python >= 3.2
38-
* PyPy and PyPy3
36+
* Python >= 3.6
37+
* PyPy3
3938

4039
**Install:**
4140

setup.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,11 @@
3333
"License :: OSI Approved :: MIT License",
3434
"Operating System :: OS Independent",
3535
"Programming Language :: Python",
36-
"Programming Language :: Python :: 2.7",
3736
"Programming Language :: Python :: 3",
38-
"Programming Language :: Python :: 3.2",
39-
"Programming Language :: Python :: 3.3",
40-
"Programming Language :: Python :: 3.4",
41-
"Programming Language :: Python :: 3.5",
4237
"Programming Language :: Python :: 3.6",
38+
"Programming Language :: Python :: 3.7",
39+
"Programming Language :: Python :: 3.8",
40+
"Programming Language :: Python :: 3.9",
4341
"Programming Language :: Python :: Implementation :: CPython",
4442
"Programming Language :: Python :: Implementation :: PyPy"
4543
],

tests/__init__.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ def get_response(self):
3030
yield b""
3131

3232

33-
class ThreadedHTTPServer(ThreadingMixIn, HTTPServer):
34-
pass
35-
36-
3733
def read_file(filename, mode="r"):
3834
filename = os.path.join(os.path.dirname(__file__), filename)
3935
return open(filename, mode).read()
@@ -47,7 +43,7 @@ def new_server_thread(handle_cls, port=None):
4743
current_port += 1
4844
test_lock.release()
4945

50-
server = ThreadedHTTPServer(
46+
server = HTTPServer(
5147
(HOST, port),
5248
handle_cls
5349
)

tox.ini

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
[tox]
2-
envlist = py27,py32,py33,py34,py35,py36,pypy,pypy3
2+
envlist = py36,py37,py38,py39,pypy3
33

44
[testenv]
5-
deps = pytest
6-
commands = py.test
5+
deps =
6+
pytest
7+
pytest-cov
8+
commands = pytest --cov overpy --cov-report=term-missing -v tests/
9+
10+
[gh-actions]
11+
python =
12+
3.6: py36
13+
3.7: py37
14+
3.8: py38
15+
3.9: py39
16+
pypy3: pypy3

0 commit comments

Comments
 (0)