See More

# SpeechBrain lint and unit tests to ease continuous integration # NOTE: Caching these offers no speedup name: SpeechBrain toolkit CI # Runs on pushes to master and all pull requests on: # yamllint disable-line rule:truthy push: branches: [main, develop] pull_request: jobs: linters: name: Linters runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Set up Python 3.8 uses: actions/setup-python@v1 with: python-version: 3.8 - name: Lint dependencies run: | python -m pip install --upgrade pip pip install -r lint-requirements.txt - name: Run linters run: | flake8 . --count --show-source --statistics black --check --diff . yamllint . tests: name: Tests runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Set up Python 3.8 uses: actions/setup-python@v1 with: python-version: 3.8 - name: Install libsndfile run: | sudo apt-get install -y libsndfile1 - name: Full dependencies run: | pip install -r requirements.txt pip install --editable . - name: Unittests with pytest run: | pytest tests/unittests - name: Doctests with pytest run: | pytest --doctest-modules speechbrain - name: Integration tests with pytest run: | pytest tests/integration