Skip to content

Commit

Permalink
Merge pull request #81 from pnuu/feature-ci
Browse files Browse the repository at this point in the history
Add Github Action to run unit tests
  • Loading branch information
mraspaud authored Apr 13, 2021
2 parents e36ae8f + 0454b3a commit 7cb0d48
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 20 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Run tests

on:
- push
- pull_request

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: ["3.7", "3.8", "3.9"]
experimental: [false]
steps:
- name: Checkout source
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: |
pip install -U pytest pytest-cov trollsift six netifaces watchdog posttroll pyyaml pyinotify
- name: Install pytroll-collectors
run: |
pip install --no-deps -e .
- name: Run tests
run: |
pytest --cov=pytroll_collectors pytroll_collectors/tests --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
env_vars: PYTHON_VERSION
14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

Empty file added codecov.yml
Empty file.
2 changes: 1 addition & 1 deletion pytroll_collectors/trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ class AbstractMessageProcessor(Thread):

def __init__(self, services, topics, nameserver="localhost"):
"""Init the message processor."""
Thread.__init__(self)
super(AbstractMessageProcessor, self).__init__()
LOG.debug("Nameserver: {}".format(nameserver))
self.nssub = NSSubscriber(services, topics, True, nameserver=nameserver)
self.sub = None
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[bdist_rpm]
provides=pytroll_collectors
requires=pykdtree posttroll trollsift python-inotify python-netifaces python-watchdog python-pillow
requires=posttroll trollsift python-inotify python-netifaces python-watchdog pytroll-schedule six pyyaml

no-autoreq=True
release=20121210-1
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@
],
data_files=[],
zip_safe=False,
install_requires=['pykdtree', 'pyinotify', 'posttroll>=1.3.0',
install_requires=['pyinotify', 'posttroll>=1.3.0',
'trollsift', 'netifaces', 'watchdog',
'pytroll-schedule', 'pyresample',
'pillow', 'pycoast', 'six'],
tests_require=['mock', 'scipy', 'trollsift', 'pillow', 'six'],
'pytroll-schedule',
'six', 'pyyaml'],
tests_require=['trollsift', 'six', 'netifaces', 'watchdog', 'posttroll', 'pyyaml', 'pyinotify'],
)

0 comments on commit 7cb0d48

Please sign in to comment.