github: add v2 Github Actions

This commit is contained in:
Hervé BREDIN authored and GitHub committed 2020-11-08 21:40:28 +01:00
1 parent 81af0145c0
commit b5ad4f86f9
1 file changed
+44
+44
View File
@@ -0,0 +1,44 @@
name: Tests
on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
jobs:
build:
timeout-minutes: 20
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [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 libsndfile
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get install libsndfile1
- name: Install pyannote.audio
run: |
pip install -e .[dev,testing]
- name: Test with pytest
run: |
export PYANNOTE_DATABASE_CONFIG=$GITHUB_WORKSPACE/tests/data/database.yml
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