aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/cpu-unit-tests.yml
blob: d8efd53a81497a793fa73871b5ae835e05f9e04b (plain) (blame)
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
name: CPU unit tests

on:
  pull_request:
  push:
    branches: [main]

jobs:
  unit-tests:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: "3.10"
          cache: pip
          cache-dependency-path: requirements-macos-arm64.txt
      - name: Install CPU test dependencies
        run: |
          python -m pip install --upgrade pip
          python -m pip install torch==2.11.0 --index-url https://download.pytorch.org/whl/cpu
          python -m pip install numpy==1.26.4 huggingface-hub==1.27.0 soundfile==0.14.0
      - name: Compile and run unit tests
        run: |
          python -m py_compile inference.py tests/test_inference.py
          python -m unittest discover -s tests -v