diff --git a/.github/workflows/tox-test.yml b/.github/workflows/tox-test.yml new file mode 100644 index 0000000..e13d2fa --- /dev/null +++ b/.github/workflows/tox-test.yml @@ -0,0 +1,39 @@ +# This workflow will install Python dependencies, run tests and lint using tox + +name: tests + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + max-parallel: 2 + matrix: + python-version: ["3.9", "3.10"] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install tox tox-gh-actions flake8 + - name: Lint + run: | + flake8 tasks3 tests + - name: Test with tox + run: | + tox diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d9d01cb..0000000 --- a/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -# Config file for automatic testing at travis-ci.com - -language: python -python: - - 3.8 - - 3.7 - - 3.6 - -# Command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors -install: pip install -U tox-travis - -# Command to run tests, e.g. python setup.py test -script: tox - diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index caede04..8e98fe1 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -103,7 +103,7 @@ Before you submit a pull request, check that it meets these guidelines: your new functionality into a function with a docstring, and add the feature to the list in README.rst. 3. The pull request should work for Python 3.9, 3.10, and for PyPy. Check - https://travis-ci.com/hXtreme/tasks3/pull_requests + https://github.com/hXtreme/tasks3/actions/workflows/tox-test.yml and make sure that the tests pass for all supported Python versions. Tips diff --git a/README.rst b/README.rst index 6422a7f..58bdc74 100644 --- a/README.rst +++ b/README.rst @@ -6,8 +6,8 @@ tasks3 .. image:: https://img.shields.io/pypi/v/tasks3.svg :target: https://pypi.python.org/pypi/tasks3 -.. image:: https://img.shields.io/travis/hXtreme/tasks3.svg - :target: https://travis-ci.com/hXtreme/tasks3 +.. image:: https://github.com/hXtreme/tasks3/actions/workflows/tox-test.yml/badge.svg + :target: https://github.com/hXtreme/tasks3/actions/workflows/tox-test.yml .. image:: https://readthedocs.org/projects/tasks3/badge/?version=latest :target: https://tasks3.readthedocs.io/en/latest/?badge=latest diff --git a/tox.ini b/tox.ini index a6c219d..d41cdc8 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] envlist = py39, py310, flake8 -[travis] +[gh-actions] python = 3.9: py39 3.10: py310