diff options
| author | engn33r <engn33r@users.noreply.github.com> | 2021-02-27 17:13:08 -0500 |
|---|---|---|
| committer | engn33r <engn33r@users.noreply.github.com> | 2021-02-27 17:13:08 -0500 |
| commit | 36e32c7c842f5984f59451008c13519989b91bd9 (patch) | |
| tree | 64f4d54dd4b5289dd1603f9a5154cb706fd67585 | |
| parent | ed652a55090e8eaf3e5d715962c9d0715150b3c6 (diff) | |
| download | websocket-client-36e32c7c842f5984f59451008c13519989b91bd9.tar.gz | |
Replace TravisCI with GitHub Actions
| -rw-r--r-- | .github/workflows/build.yml | 29 | ||||
| -rw-r--r-- | .github/workflows/codecoverage.yml | 24 | ||||
| -rw-r--r-- | .github/workflows/lint.yml | 20 | ||||
| -rw-r--r-- | .travis.yml | 26 | ||||
| -rw-r--r-- | MANIFEST.in | 2 | ||||
| -rw-r--r-- | setup.py | 12 | ||||
| -rw-r--r-- | websocket/tests/test_websocket.py | 4 |
7 files changed, 85 insertions, 32 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..b6fc704 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,29 @@ +name: websocket-client build and test + +on: [push] + +jobs: + build: + runs-on: ${{ matrix.os }} + + strategy: + matrix: + python-version: [2.7, 3.6, 3.7, 3.8, 3.9] + os: [ubuntu-latest, macOS-latest, windows-latest] + + steps: + - name: Check out source repository + uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} environment + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Build websocket-client & run tests + run: | + pip install -U pip setuptools wheel readme_renderer twine six pytest + python -c "import setuptools; print('Setup tools version'); print(setuptools.__version__)" + pytest websocket/tests -v -rP + python setup.py sdist + twine check dist/* + env: + TEST_WITH_INTERNET: 1 diff --git a/.github/workflows/codecoverage.yml b/.github/workflows/codecoverage.yml new file mode 100644 index 0000000..b24c38b --- /dev/null +++ b/.github/workflows/codecoverage.yml @@ -0,0 +1,24 @@ +name: Code Coverage + +on: [push] + +jobs: + code-coverage: + runs-on: ubuntu-latest + steps: + - name: Check out source repository + uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} environment + uses: actions/setup-python@v2 + with: + python-version: "3.9" + - name: Run test cases for coverage collection + run: | + pip install six + python setup.py install + pip install coverage + coverage run --source=websocket --omit="/*/tests/__init__.py","*/tests/test_cookiejar.py","*/tests/test_websocket.py" websocket/tests/test_websocket.py + coverage report + coverage xml + - name: Submit code coverage report to Codecov.io + uses: codecov/codecov-action@v1.2.1 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..b767753 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,20 @@ +name: Linting with flake8 + +on: [push, pull_request] + +jobs: + flake8-lint: + runs-on: ubuntu-latest + name: lint + steps: + - name: Check out source repository + uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} environment + uses: actions/setup-python@v2 + with: + python-version: "3.9" + - name: Perform flake8 linting + run: | + pip install flake8 + flake8 --version + flake8 . --exit-zero --statistics diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index acf227b..0000000 --- a/.travis.yml +++ /dev/null @@ -1,26 +0,0 @@ -language: python - -python: - - '2.7' - - '3.4' - - '3.5' - - '3.6' - - '3.7' - - '3.8' - - '3.9' - -install: - - pip install -U pip setuptools wheel - - pip install -U coverage codecov - - if [ "${TRAVIS_PYTHON_VERSION:0:3}" == "3.4" ]; then pip install readme_renderer==24.0; else pip install -U readme_renderer; fi - - python -c "import setuptools; print(setuptools.__version__)" - -script: - - TEST_WITH_INTERNET=1 python setup.py test - - python setup.py check -r -s - -after_success: - - coverage run --source=websocket --omit="/*/tests/__init__.py","*/tests/test_cookiejar.py","*/tests/test_websocket.py" websocket/tests/test_websocket.py - - coverage report - - coverage xml - - bash <(curl -s https://codecov.io/bash) diff --git a/MANIFEST.in b/MANIFEST.in index 9df2a36..2c0687d 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,4 @@ include LICENSE -include README.rst +include README.md include ChangeLog recursive-include examples * @@ -62,12 +62,14 @@ except Exception: setup( name=NAME, version=VERSION, - description="WebSocket client for Python. hybi13 is supported.", - long_description=open("README.rst").read(), + description="WebSocket client for Python with low level API options", + long_description=open("README.md").read(), + long_description_content_type='text/markdown', author="liris", author_email="liris.pp@gmail.com", license="LGPL version 2.1", url="https://github.com/websocket-client/websocket-client.git", + download_url='https://github.com/websocket-client/websocket-client/releases', python_requires='>=2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*', classifiers=[ "Development Status :: 4 - Beta", @@ -90,7 +92,11 @@ setup( "Topic :: Software Development :: Libraries :: Python Modules", "Intended Audience :: Developers", ], - keywords='websockets', + project_urls={ + 'Documentation': 'https://websocket-client.readthedocs.io/', + 'Source': 'https://github.com/websocket-client/websocket-client/', + }, + keywords='websockets client', scripts=["bin/wsdump.py"], install_requires=install_requires, packages=["websocket", "websocket.tests"], diff --git a/websocket/tests/test_websocket.py b/websocket/tests/test_websocket.py index c28e55a..a2953dd 100644 --- a/websocket/tests/test_websocket.py +++ b/websocket/tests/test_websocket.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# """ """ @@ -22,8 +24,6 @@ Copyright (C) 2010 Hiroki Ohtani(liris) Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA """ -# -*- coding: utf-8 -*- -# import sys sys.path[0:0] = [""] |
