Skip to content

MAINT: Make sure CIs are still green #30

MAINT: Make sure CIs are still green

MAINT: Make sure CIs are still green #30

Workflow file for this run

name: 'tests'
concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }}
cancel-in-progress: true
on: # yamllint disable-line rule:truthy
push:
branches:
- '*'
pull_request:
branches:
- '*'
jobs:
job:
name: ${{ matrix.os }} ${{ matrix.kind }}
continue-on-error: true
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-22.04', 'windows-2022', 'macos-latest', 'macos-13']
kind: ['pip']
python: ['3.12']
include:
- os: 'ubuntu-20.04'
kind: 'old'
python: '3.8'
steps:
- uses: actions/checkout@v3
- uses: LABSN/sound-ci-helpers@v1
- uses: pyvista/setup-headless-display-action@main
with:
qt: true
pyvista: false
- run: sudo apt install -q libavutil56 libavcodec58 libavformat58 libswscale5 libglu1-mesa gstreamer1.0-alsa gstreamer1.0-libav python3-gst-1.0
if: ${{ startsWith(matrix.os, 'ubuntu') }}
- run: powershell make/get_video.ps1
if: ${{ startsWith(matrix.os, 'windows') }}
- run: |
set -xeo pipefail
if [[ "${{ runner.os }}" == "Windows" ]]; then
echo "Setting env vars for Windows"
echo "AZURE_CI_WINDOWS=true" >> $GITHUB_ENV
echo "SOUND_CARD_BACKEND=rtmixer" >> $GITHUB_ENV
echo "SOUND_CARD_NAME=Speakers" >> $GITHUB_ENV
echo "SOUND_CARD_FS=48000" >> $GITHUB_ENV
echo "SOUND_CARD_API=Windows WDM-KS" >> $GITHUB_ENV
elif [[ "${{ runner.os }}" == "Linux" ]]; then
echo "Setting env vars for Linux"
echo "_EXPYFUN_SILENT=true" >> $GITHUB_ENV
echo "SOUND_CARD_BACKEND=pyglet" >> $GITHUB_ENV
elif [[ "${{ runner.os }}" == "macOS" ]]; then
echo "Setting env vars for macOS"
fi
name: Set env vars
shell: bash
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- run: python -m pip install --upgrade pip setuptools wheel sounddevice
- run: python -m pip install --upgrade --only-binary="sounddevice,rtmixer,scipy,matplotlib,pandas,numpy" sounddevice rtmixer "pyglet<1.6" scipy matplotlib pandas h5py mne numpydoc pillow joblib
if: ${{ matrix.kind == 'pip' }}
- run: python -m pip install --only-binary="sounddevice,rtmixer,numpy,scipy,matplotlib" sounddevice rtmixer "pyglet<1.4" numpy scipy matplotlib "pillow<8"
if: ${{ matrix.kind == 'old' }}
- run: python -m pip install tdtpy
if: ${{ startsWith(matrix.os, 'windows') }}
- run: python -m sounddevice
- run: |
set -xeo pipefail
python -m sounddevice | grep "[82] out"
shell: bash
name: Check that there is some output device
- run: python -c "import pyglet; print(pyglet.version)"
- run: python -c "import matplotlib.pyplot as plt"
- run: pip install -ve .[test]
- run: python -c "import expyfun; expyfun._utils._has_video(raise_error=True)"
if: ${{ matrix.kind != 'old' }}
- run: pytest --tb=short --cov=expyfun --cov-report=xml expyfun
- uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
if: always()