diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml new file mode 100644 index 00000000..c38701a8 --- /dev/null +++ b/.github/workflows/unittests.yml @@ -0,0 +1,27 @@ +name: Unit Tests + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.6', '3.7', '3.8', '3.9'] + + steps: + - uses: actions/checkout@v2 + - 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 .[contrib] + pip install coverage codecov + - name: Test with unittest + run: | + coverage run -m unittest -v + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 diff --git a/.github/workflows/verification.yml b/.github/workflows/verification.yml new file mode 100644 index 00000000..de6e1a3a --- /dev/null +++ b/.github/workflows/verification.yml @@ -0,0 +1,23 @@ +name: Static Checks + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.9' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install .[contrib] + - name: Lint with flake8 + run: | + flake8 tardis tests setup.py + - name: Format with black + run: | + black tardis tests setup.py --diff --check --target-version py36 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d7679cc1..00000000 --- a/.travis.yml +++ /dev/null @@ -1,37 +0,0 @@ -language: python - -python: - - "3.6" - - "3.7" - - "3.8" - - "3.9" - - "nightly" # currently points to 3.8-dev - - "pypy3" - -os: - - linux - -matrix: - allow_failures: - - python: "nightly" - - python: "pypy3" - include: - - python: 3.7 - name: Style - dist: xenial - script: - - python -m flake8 tardis tests setup.py - - python -m black --target-version py36 --check tardis/ tests/ setup.py - fast_finish: true - -install: - - pip install codecov - - pip install coverage - - pip install .[contrib] - - pip install git+https://github.com/MatterMiners/cobald.git - -script: coverage run setup.py test - -after_success: - - coverage report - - codecov diff --git a/README.md b/README.md index 880d4f70..256ddd32 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ -[![Build Status](https://travis-ci.org/MatterMiners/tardis.svg?branch=master)](https://travis-ci.org/MatterMiners/tardis) +[![Build Status](https://github.com/MatterMiners/tardis/actions/workflows/unittests.yml/badge.svg)](https://github.com/MatterMiners/tardis/actions/workflows/unittests.yml) +[![Verification](https://github.com/MatterMiners/tardis/actions/workflows/verification.yml/badge.svg)](https://github.com/MatterMiners/tardis/actions/workflows/verification.yml) [![codecov](https://codecov.io/gh/MatterMiners/tardis/branch/master/graph/badge.svg)](https://codecov.io/gh/MatterMiners/tardis) [![Documentation Status](https://readthedocs.org/projects/cobald-tardis/badge/?version=latest)](https://cobald-tardis.readthedocs.io/en/latest/?badge=latest) [![Development and Help Chat](https://badges.gitter.im/MatterMiners.png)](https://gitter.im/MatterMiners/community) diff --git a/setup.py b/setup.py index 615818bb..3a46a9c5 100644 --- a/setup.py +++ b/setup.py @@ -68,7 +68,8 @@ extras_require={ "docs": ["sphinx", "sphinx_rtd_theme", "sphinxcontrib-contentui"], "test": TESTS_REQUIRE, - "contrib": ["flake8", "flake8-bugbear", "black"] + TESTS_REQUIRE, + "contrib": ["flake8", "flake8-bugbear", "black; implementation_name=='cpython'"] + + TESTS_REQUIRE, }, tests_require=TESTS_REQUIRE, zip_safe=False,