-
Notifications
You must be signed in to change notification settings - Fork 1.7k
58 lines (56 loc) · 2.3 KB
/
pythonapp.yml
File metadata and controls
58 lines (56 loc) · 2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# 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:
if: github.event.pull_request.draft == false
name: Tests
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", 3.13]
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v4
id: cache-uv
with:
path: ~/.cache/uv
key: ${{ runner.os }}-python-${{ matrix.python-version }}-uv
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Full dependencies
run: |
pip install uv
uv pip install --system -r requirements.txt torch==2.6.0+cpu torchaudio==2.6.0+cpu --extra-index-url https://download.pytorch.org/whl/cpu
uv pip install --system --editable . --no-deps # already installed pinned deps from requirements.txt, we're good
- 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: 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