diff --git a/.github/workflows/python-build-test.yml b/.github/workflows/python-build-test.yml new file mode 100644 index 00000000..a873cae9 --- /dev/null +++ b/.github/workflows/python-build-test.yml @@ -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 diff --git a/requirements.txt b/requirements.txt index 1d17e57d..6950d50e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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 diff --git a/tests/test_import_lib.py b/tests/test_import_lib.py new file mode 100644 index 00000000..1af25499 --- /dev/null +++ b/tests/test_import_lib.py @@ -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