Skip to content
Merged
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
10 changes: 8 additions & 2 deletions .github/workflows/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,10 @@ jobs:
env:
GCS_ASSET_BUCKET_NAME: ${{ secrets.GCS_ASSET_BUCKET_NAME }}
GCS_READER_SERVICE_ACCOUNT_KEY: ${{ secrets.GCS_READER_SERVICE_ACCOUNT_KEY }}
run: python ./tests/download_test_plugins.py
run: |
# Inline install here on purpose, as this is only required for test _setup_ and not running
pip install google-cloud-storage
python ./tests/download_test_plugins.py
- name: Setup audio device for testing
if: runner.os == 'Linux'
run: |
Expand Down Expand Up @@ -714,7 +717,10 @@ jobs:
env:
GCS_ASSET_BUCKET_NAME: ${{ secrets.GCS_ASSET_BUCKET_NAME }}
GCS_READER_SERVICE_ACCOUNT_KEY: ${{ secrets.GCS_READER_SERVICE_ACCOUNT_KEY }}
run: python ./tests/download_test_plugins.py
run: |
# Inline install here on purpose, as this is only required for test _setup_ and not running
pip install google-cloud-storage
python ./tests/download_test_plugins.py
- name: Run tests
if: matrix.os != 'ubuntu-24.04' || matrix.python-version != '3.10'
run: pytest --maxfail=4 --cov-report term --cov-fail-under=${{ env.MINIMUM_COVERAGE_PERCENTAGE }} --cov=pedalboard --durations=100
Expand Down
7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ test-command = "pytest {project}/tests"
# so we can't run post-wheel-build tests there.
# The musllinux containers on aarch64 take 6+ hours to test.
# Also testing any pypy versions fails, as TensorFlow isn't pypy compatible.
test-skip = "*manylinux* *musllinux_aarch* *pp* *-macosx_universal2:arm64"
musllinux-x86_64-image = "quay.io/pypa/musllinux_1_1_x86_64:2024-04-29-07d05a0"
musllinux-aarch64-image = "quay.io/pypa/musllinux_1_1_aarch64:2024-04-29-07d05a0"
# cp313t is skipped because cffi doesn't support free-threaded Python 3.13.
test-skip = "*manylinux* *musllinux_aarch* *pp* *-macosx_universal2:arm64 *cp313t*"
musllinux-x86_64-image = "quay.io/pypa/musllinux_1_1_x86_64:latest"
musllinux-aarch64-image = "quay.io/pypa/musllinux_1_1_aarch64:latest"

# See: https://cibuildwheel.readthedocs.io/en/stable/options/#examples
[tool.cibuildwheel.linux]
Expand Down
1 change: 0 additions & 1 deletion test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ wheel
numpy>=2.1.0rc1; python_version>="3.13"
numpy>=2; python_version>="3.9" and python_version<"3.13"
numpy<2; python_version<="3.8"
google-cloud-storage
tqdm
psutil
mypy
Expand Down
15 changes: 12 additions & 3 deletions tests/download_test_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,22 @@
import os
import platform

from google.auth.exceptions import RefreshError
from google.cloud import storage
from google.oauth2 import service_account
try:
from google.auth.exceptions import RefreshError
from google.cloud import storage
from google.oauth2 import service_account
HAS_GCS = True
except ImportError:
HAS_GCS = False

from tqdm import tqdm


def main():
if not HAS_GCS:
print("google-cloud-storage not installed. Skipping plugin download.")
print("Install with: pip install google-cloud-storage")
return
GCS_ASSET_BUCKET_NAME = os.environ.get("GCS_ASSET_BUCKET_NAME")
if not GCS_ASSET_BUCKET_NAME:
print("Missing GCS_ASSET_BUCKET_NAME environment variable! Not downloading.")
Expand Down