Skip to content

Commit

Permalink
Merge pull request #178 from MatterMiners/maintenance/gh-actions
Browse files Browse the repository at this point in the history
Switch CI to GitHub actions
  • Loading branch information
maxfischer2781 authored Mar 24, 2021
2 parents b83eace + abe7ba8 commit 40068e4
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 39 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
@@ -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
23 changes: 23 additions & 0 deletions .github/workflows/verification.yml
Original file line number Diff line number Diff line change
@@ -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
37 changes: 0 additions & 37 deletions .travis.yml

This file was deleted.

3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 40068e4

Please sign in to comment.