github: add initial Tests workflow

Co-authored-by: Hervé BREDIN <hbredin@users.noreply.github.com>
This commit is contained in:
Harry Coultas BlumandHervé BREDIN authored and Hervé Bredin committed 2020-11-08 22:43:13 +01:00
1 parent ad69a34cad
commit 2ee6b47397
3 files changed
+52 -5

No files matched your search

+38
View File
@@ -0,0 +1,38 @@
name: Tests
on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8]
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 library
run: |
sudo apt-get install libsndfile1
pip install -e .[dev,testing]
- name: Test with pytest
run: |
pytest
# Turn back on when the repository is public again
# - name: Generate coverage report
# run: |
# pytest --cov-report=xml
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v1
# with:
# file: ./coverage.xml
# env_vars: PYTHON
# name: codecov-fastaudio
# fail_ci_if_error: true
+6 -5
View File
@@ -1,9 +1,10 @@
torch >= 1.6
torchaudio >= 0.6
pytorch_lightning >= 1.0.0rc4
pytorch_metric_learning >= 0.9.93
einops >= 0.3.0
librosa >= 0.8
pyannote.core >= 4.1
pyannote.database >= 4.0.1
librosa >= 0.8
pyscaffold
pytorch_lightning >= 1.0.0rc4
pytorch_metric_learning >= 0.9.93
soundfile >= 0.10.2
torch >= 1.6
torchaudio >= 0.6
+8
View File
@@ -0,0 +1,8 @@
from pyannote.audio.core.model import Model
def test_import_lib():
"""This is a dummy test, just to check
if the lib can be successfully imported.
"""
assert Model is not None