From 20090296ac709998ce8ec5184b63d858437aa6a0 Mon Sep 17 00:00:00 2001 From: Max Fischer Date: Tue, 23 Mar 2021 19:01:24 +0100 Subject: [PATCH 1/9] added GH action for static verification --- .github/workflows/verification.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/verification.yml diff --git a/.github/workflows/verification.yml b/.github/workflows/verification.yml new file mode 100644 index 00000000..3ae50c98 --- /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 From 28546d51c155587229f11f0d4b28830cc0213bda Mon Sep 17 00:00:00 2001 From: Max Fischer Date: Tue, 23 Mar 2021 19:13:34 +0100 Subject: [PATCH 2/9] added GH action for unittests --- .github/workflows/unittests.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/unittests.yml diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml new file mode 100644 index 00000000..1c68aee3 --- /dev/null +++ b/.github/workflows/unittests.yml @@ -0,0 +1,26 @@ +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] + - name: Test with unittest + run: | + coverage run -m unittest -v + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 From 7e26ed11dd93e113f6f42e7fcadc42a12cac58ec Mon Sep 17 00:00:00 2001 From: Max Fischer Date: Tue, 23 Mar 2021 19:15:51 +0100 Subject: [PATCH 3/9] added missing test packages --- .github/workflows/unittests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index 1c68aee3..c38701a8 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -19,6 +19,7 @@ jobs: run: | python -m pip install --upgrade pip pip install .[contrib] + pip install coverage codecov - name: Test with unittest run: | coverage run -m unittest -v From 78b77d381659bad7d74955c48edd8811da9fa857 Mon Sep 17 00:00:00 2001 From: Max Fischer Date: Tue, 23 Mar 2021 19:20:23 +0100 Subject: [PATCH 4/9] re-enabled pypy3 for tests --- .github/workflows/unittests.yml | 2 +- setup.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index c38701a8..0d56228b 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.6', '3.7', '3.8', '3.9'] + python-version: ['3.6', '3.7', '3.8', '3.9', 'pypy3'] steps: - uses: actions/checkout@v2 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, From 28e2457bae0ec29f1d9734005cbc97b81973f7c1 Mon Sep 17 00:00:00 2001 From: Max Fischer Date: Tue, 23 Mar 2021 19:34:16 +0100 Subject: [PATCH 5/9] marked pypy3 as optional (?) --- .github/workflows/unittests.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index 0d56228b..eedec454 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -5,9 +5,14 @@ on: [push, pull_request] jobs: build: runs-on: ubuntu-latest + continue-on-error: ${{ matrix.experimental }} strategy: matrix: - python-version: ['3.6', '3.7', '3.8', '3.9', 'pypy3'] + python-version: ['3.6', '3.7', '3.8', '3.9'] + experimental: [ false ] + include: + - python-version: 'pypy3' + experimental: true steps: - uses: actions/checkout@v2 From d39665bf71459bfe3bb8a1e9b78a4912826e20dc Mon Sep 17 00:00:00 2001 From: Max Fischer Date: Tue, 23 Mar 2021 20:18:36 +0100 Subject: [PATCH 6/9] removed experimental pypy3 build --- .github/workflows/unittests.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index eedec454..c38701a8 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -5,14 +5,9 @@ on: [push, pull_request] jobs: build: runs-on: ubuntu-latest - continue-on-error: ${{ matrix.experimental }} strategy: matrix: python-version: ['3.6', '3.7', '3.8', '3.9'] - experimental: [ false ] - include: - - python-version: 'pypy3' - experimental: true steps: - uses: actions/checkout@v2 From 167e21d78d9f554ddbda38b59b1866ad466a8691 Mon Sep 17 00:00:00 2001 From: Max Fischer Date: Tue, 23 Mar 2021 20:32:32 +0100 Subject: [PATCH 7/9] switched badges --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) From 5dc8e079205d8e89143ce1931d6fdd8b2d59225d Mon Sep 17 00:00:00 2001 From: Max Fischer Date: Wed, 24 Mar 2021 09:35:02 +0100 Subject: [PATCH 8/9] removed travis configuration --- .travis.yml | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 .travis.yml 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 From abe7ba894c76fcb7b346dc3255201981b11ba8e3 Mon Sep 17 00:00:00 2001 From: Max Fischer Date: Wed, 24 Mar 2021 10:31:30 +0100 Subject: [PATCH 9/9] forcing black format version to 3.6 --- .github/workflows/verification.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/verification.yml b/.github/workflows/verification.yml index 3ae50c98..de6e1a3a 100644 --- a/.github/workflows/verification.yml +++ b/.github/workflows/verification.yml @@ -20,4 +20,4 @@ jobs: flake8 tardis tests setup.py - name: Format with black run: | - black tardis tests setup.py --diff --check + black tardis tests setup.py --diff --check --target-version py36