diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..b01cd38 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,41 @@ +name: Tests + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + tests: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.6, 3.7, 3.8] + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - uses: actions/cache@v1 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/setup.py') }} + + - name: Install dependencies + run: | + python3 -m pip install --upgrade pip + python3 -m pip install ".[test]" + + - name: Test with pytest + run: | + python3 -m pytest -v --cov=karabo_bridge + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ad7ac37..0000000 --- a/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -language: python -python: - - 3.8 - - 3.7 - - 3.6 - -install: - - pip install -e .[test] - - pip install --upgrade codecov pytest - -script: - - py.test -v --cov karabo_bridge - -after_success: codecov diff --git a/README.rst b/README.rst index c0ecc04..3e05ab4 100644 --- a/README.rst +++ b/README.rst @@ -2,8 +2,8 @@ European XFEL Karabo Bridge =========================== -.. image:: https://travis-ci.org/European-XFEL/karabo-bridge-py.svg?branch=master - :target: https://travis-ci.org/European-XFEL/karabo-bridge-py +.. image:: https://github.com/European-XFEL/karabo-bridge-py/workflows/Tests/badge.svg + :target: https://github.com/European-XFEL/karabo-bridge-py/actions?query=workflow%3ATests .. image:: https://codecov.io/gh/European-XFEL/karabo-bridge-py/branch/master/graph/badge.svg :target: https://codecov.io/gh/European-XFEL/karabo-bridge-py