# SpeechBrain 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: tests: name: Tests runs-on: ubuntu-latest strategy: matrix: python-version: [3.9, "3.10", 3.11] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} - name: Install sox run: | sudo apt-get update sudo apt install sox libsox-dev # Installing only SoX for now due to FFmpeg issues on the CI server with Torchaudio 2.1. # FFmpeg works fine on all other machines. We'll switch back when the CI server is fixed. #- name: Install ffmpeg # run: | # sudo apt-get update # sudo apt-get install -y ffmpeg - name: Display Python version run: python -c "import sys; print(sys.version)" - name: Full dependencies run: | sudo apt-get update pip install -r requirements.txt pip install --editable . pip install ctc-segmentation - name: Consistency tests with pytest run: | pytest tests/consistency - 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