Optimise & fix sonification (#355) #1
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: Test Python code | |
on: | |
pull_request: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: True | |
jobs: | |
test: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["3.8", "3.9", "3.10"] | |
channel-priority: [strict] | |
include: | |
- python-version: "3.10" | |
os: macos-latest | |
- python-version: "3.10" | |
os: windows-latest | |
- python-version: "3.10" | |
os: ubuntu-latest | |
channel-priority: flexible | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache conda packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/conda_pkgs_dir | |
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('.github/environment.yml') }} | |
- name: Create conda environment | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
auto-activate-base: false | |
channel-priority: ${{ matrix.channel-priority }} | |
environment-file: .github/environment.yml | |
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly! | |
- name: Install package in development mode | |
shell: bash -l {0} | |
run: python -m pip install --upgrade-strategy=only-if-needed -e .[display,testing] | |
- name: Log installed packages for debugging | |
shell: bash -l {0} | |
run: | | |
conda info -a | |
conda list | |
- name: Show libraries in the system on which NumPy was built | |
shell: bash -l {0} | |
run: python -c "import numpy; numpy.show_config()" | |
- name: Run unit tests | |
shell: bash -l {0} | |
run: pytest --cov=mir_eval | |
working-directory: tests |