From 46cfcbf61fe63e8243cfb0db1b6273356d419f47 Mon Sep 17 00:00:00 2001 From: Miguel Grinberg Date: Fri, 20 Nov 2020 20:17:44 +0000 Subject: [PATCH] Move builds to GitHub actions --- .github/workflows/tests.yml | 52 +++++++++++++++++++++++++++++++++++++ README.md | 2 +- tox.ini | 31 ++++++++++++++++++++++ 3 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/tests.yml create mode 100644 tox.ini diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000..52e89163 --- /dev/null +++ b/.github/workflows/tests.yml @@ -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 diff --git a/README.md b/README.md index 6fc9dbf0..76462b2f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ Flask-SocketIO ============== -[![Build Status](https://travis-ci.org/miguelgrinberg/Flask-SocketIO.png?branch=master)](https://travis-ci.org/miguelgrinberg/Flask-SocketIO) +[![Build status](https://github.com/miguelgrinberg/flask-socketio/workflows/build/badge.svg)](https://github.com/miguelgrinberg/Flask-SocketIO/actions) [![codecov](https://codecov.io/gh/miguelgrinberg/flask-socketio/branch/master/graph/badge.svg)](https://codecov.io/gh/miguelgrinberg/flask-socketio) Socket.IO integration for Flask applications. diff --git a/tox.ini b/tox.ini new file mode 100644 index 00000000..c396556e --- /dev/null +++ b/tox.ini @@ -0,0 +1,31 @@ +[tox] +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= + python setup.py test + +[testenv:flake8] +deps= + six + flake8 +commands= + flake8 --exclude=".*" --ignore=W503,E402,E722 flask_socketio test_socketio.py + +[testenv:docs] +changedir=docs +deps= + sphinx +whitelist_externals= + make +commands= + make html