Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Fast test suite on CPU. Slow tests (network, model weights, inference) are excluded.
name: CI

on:
push:
branches: [main]
pull_request:

permissions:
contents: read

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
fast-tests:
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
cache-dependency-path: pyproject.toml

- name: Install system audio libraries (fpcalc comes from libchromaprint-tools)
timeout-minutes: 10
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends ffmpeg libsndfile1 libchromaprint-tools

- name: Install package (CPU-only torch)
run: |
python -m pip install --upgrade pip
python -m pip install torch torchaudio --index-url https://download.pytorch.org/whl/cpu
python -m pip install -e ".[test]"

- name: Run fast test suite
run: python -m pytest -m "not slow" -q -p no:cacheprovider
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ dependencies = [
]

[project.optional-dependencies]
# Fast-suite (pytest -m "not slow") dependencies, used by CI.
test = ["pytest>=8", "librosa>=0.10", "onnx>=1.16"]
clam = ["transformers>=4.40"]
spectttra = [
"sonics @ git+https://github.com/awsaf49/sonics.git@9156ffad151f797c71556923c4a02fa01fa8fc91",
Expand Down
Loading