Skip to content

Commit

Permalink
Move builds to GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Nov 18, 2020
1 parent 1751039 commit 232f165
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 34 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
example/wsgi/static/engine.io.js linguist-vendored
example/aiohttp/static/engine.io.js linguist-vendored

tests/common/index.html binary
tests/asyncio/index.html binary
52 changes: 52 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: build
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: python -m pip install --upgrade pip wheel
- run: pip install tox tox-gh-actions
- run: tox -eflake8
- run: tox -edocs
tests:
name: tests
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python: ['3.6', '3.7', '3.8', '3.9', 'pypy3']
exclude:
# pypy3 currently fails to run on Windows
- os: windows-latest
python: pypy3
# the loop fails to close in the Mac version of 3.9
- os: macos-latest
python: '3.9'
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- run: python -m pip install --upgrade pip wheel
- run: pip install tox tox-gh-actions
- run: tox
coverage:
name: coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: python -m pip install --upgrade pip wheel
- run: pip install tox tox-gh-actions codecov
- run: tox
- run: codecov
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

7 changes: 5 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
python-engineio
===============

.. image:: https://travis-ci.org/miguelgrinberg/python-engineio.svg?branch=master
:target: https://travis-ci.org/miguelgrinberg/python-engineio
.. image:: https://github.com/miguelgrinberg/python-engineio/workflows/build/badge.svg
:target: https://github.com/miguelgrinberg/python-engineio/actions

.. image:: https://codecov.io/gh/miguelgrinberg/python-engineio/branch/master/graph/badge.svg
:target: https://codecov.io/gh/miguelgrinberg/python-engineio

Python implementation of the `Engine.IO`_ realtime client and server.

Expand Down
3 changes: 2 additions & 1 deletion tests/asyncio/test_asyncio_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,8 @@ async def foo(arg):

c = asyncio_client.AsyncClient()
c.start_background_task(foo, 'bar')
pending = asyncio.Task.all_tasks()
pending = asyncio.all_tasks(loop=asyncio.get_event_loop()) \
if hasattr(asyncio, 'all_tasks') else asyncio.Task.all_tasks()
asyncio.get_event_loop().run_until_complete(asyncio.wait(pending))
assert r == ['bar']

Expand Down
3 changes: 2 additions & 1 deletion tests/asyncio/test_asyncio_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,8 @@ async def foo(arg):

s = asyncio_server.AsyncServer()
s.start_background_task(foo, 'bar')
pending = asyncio.Task.all_tasks()
pending = asyncio.all_tasks(loop=asyncio.get_event_loop()) \
if hasattr(asyncio, 'all_tasks') else asyncio.Task.all_tasks()
asyncio.get_event_loop().run_until_complete(asyncio.wait(pending))
assert r == ['bar']

Expand Down
19 changes: 9 additions & 10 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
[tox]
envlist=flake8,py35,py36,py37,py38,pypy3,docs
envlist=flake8,py36,py37,py38,py39,pypy3,docs
skip_missing_interpreters=True

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

[testenv]
commands=
pytest -p no:logging --cov=engineio --cov-branch --cov-report=term-missing
Expand All @@ -14,15 +22,6 @@ deps=
tornado
requests
websocket-client
basepython =
flake8: python3.8
py35: python3.5
py36: python3.6
py37: python3.7
py38: python3.8
pypy3: pypy3
coverage: python3.8
docs: python3.8

[testenv:pypy3]

Expand Down

0 comments on commit 232f165

Please sign in to comment.