Run unittests on Python 3.12 #153
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
# see: https://help.github.com/en/actions/reference/events-that-trigger-workflows | |
# Trigger the workflow on push or pull request | |
on: [push, pull_request] | |
jobs: | |
src-test: | |
name: unit-tests | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
pytorch-version: ["2.5.1", "nigthly"] | |
# Timeout: https://stackoverflow.com/a/59076067/4521646 | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install the latest version of uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install libnsdfile | |
run: | | |
sudo apt update | |
sudo apt install libsndfile1-dev libsndfile1 | |
- name: Install Python dependencies | |
run: | | |
if [ "${{ matrix.pytorch-version }}" == "nightly" ]; then | |
uv pip install --prerelease=allow torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu | |
else | |
uv pip install torch==${{ matrix.pytorch-version }} torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu | |
fi | |
uv pip install --requirements requirements.txt | |
python --version | |
uv --version | |
uv tree | |
shell: bash | |
- name: Source code tests | |
run: | | |
coverage run --append --module pytest tests --ignore tests/torch_stft_test.py | |
- name: Coverage report | |
run: | | |
coverage report --show-missing | |
coverage xml -o coverage.xml | |
- name: Codecov upload | |
uses: codecov/codecov-action@v1 | |
with: | |
file: ./coverage.xml |