From 3a01abf3c3ff8d3be879007d242cbd3dfa89f9ee Mon Sep 17 00:00:00 2001 From: Matt Molyneaux Date: Sun, 28 Feb 2021 13:33:50 +0000 Subject: [PATCH] Move to github workflows --- .github/workflows/tests.yml | 49 +++++++++++++++++++++++++++++++++++++ .gitignore | 18 +++++++------- .travis.yml | 34 ------------------------- tox.ini | 3 ++- 4 files changed, 60 insertions(+), 44 deletions(-) create mode 100644 .github/workflows/tests.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..40b8a8b --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,49 @@ +name: Tests + +on: + pull_request: + branches: + - master + push: + branches: + - master + schedule: + - cron: '02 08 * * *' + +jobs: + unit-tests: + runs-on: ${{ matrix.os }} + strategy: + matrix: + python-version: [3.5, 3.6, 3.7, 3.8, 3.9, pypy3] + os: [ubuntu-latest, macos-latest] + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install tox + run: pip install tox tox-gh-actions + - name: Run tox + run: tox + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 + + misc: + runs-on: ubuntu-latest + strategy: + matrix: + tox_env: [lint, isort, docs] + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Install tox + run: pip install tox + - name: Run tox + run: tox -e ${{ matrix.tox_env }} diff --git a/.gitignore b/.gitignore index 81c13fd..ddeca89 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,14 @@ +*.egg* *.pyc .*.sw* -/logs -/run -/env -/build -/dist -*.egg* -/tests/*.db /.coverage /.tox -/htmlcov - +/build +/coverage.xml +/dist /docs/_build +/env +/htmlcov +/logs +/run +/tests/*.db diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 419e81a..0000000 --- a/.travis.yml +++ /dev/null @@ -1,34 +0,0 @@ -language: python -dist: xenial - -python: - - "3.5" - - "3.6" - - "3.7" - - "3.8" - - pypy3.5-6.0 - -matrix: - include: - - python: "3.6" - env: TOX_ENV=docs - install: pip install tox - script: tox -e $TOX_ENV - - python: "3.6" - env: TOX_ENV=lint,isort - install: pip install tox - script: tox -e $TOX_ENV - -install: travis_retry pip install -q codecov tox - -script: tox -e py # run tox for the current version of Python - -after_success: codecov - -notifications: - irc: - channels: - - "ircs://irc.megworld.co.uk:9000#inboxen" - use_notice: true - -sudo: false diff --git a/tox.ini b/tox.ini index 9c55931..cb2c5e6 100644 --- a/tox.ini +++ b/tox.ini @@ -3,13 +3,14 @@ envlist = docs lint isort - py{35,36,37,38} + py{35,36,37,38,39,py3} [testenv] commands = python --version coverage run --branch setup.py test coverage report + coverage xml deps = coverage jinja2<3