diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..0f1e0c2 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,30 @@ +name: Tox tests + +on: + push: + branches: + - '*.*' + pull_request: + branches: + - '*.*' + +jobs: + build: + runs-on: ubuntu-latest + strategy: + max-parallel: 5 + matrix: + python-version: [3.6, 3.7, 3.8, 3.9] + + steps: + - uses: actions/checkout@v1 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install tox tox-gh-actions + - name: Test with tox + run: tox diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e7ef1a8..0000000 --- a/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -language: python -cache: - directories: - - .tox/ - - $HOME/.cache/pip -matrix: - include: - - python: "3.6" - env: TOX_ENV=py36 - name: 3.6 tests - - python: "3.7" - env: TOX_ENV=py37 - name: 3.7 tests - - python: "3.8" - env: TOX_ENV=py38 - name: 3.8 tests -# 3.9 is commented as travis doesn't have it as of October 2020 -# - python: "3.9" -# env: TOX_ENV=py39 -# name: 3.9 tests - - python: "3.8" - env: TOX_ENV=black,flake8,mypy - name: Linting - -install: - - pip uninstall -y virtualenv - - pip install tox -script: - - tox -r -e $TOX_ENV diff --git a/tox.ini b/tox.ini index 1cc492b..8a85732 100644 --- a/tox.ini +++ b/tox.ini @@ -5,6 +5,13 @@ extend-ignore = E501 # line length handled by black. envlist = py36, py37, py38, py39, flake8, mypy, black skip_missing_interpreters = True +[gh-actions] +python = + 3.6: py36 + 3.7: py37 + 3.8: py38, mypy, flake8, black + 3.9: py39, mypy, flake8, black + [testenv] deps = pytest