Repository navigation
51 lines (43 loc) · 1.73 KB
/
Copy pathtests.yml
File metadata and controls
51 lines (43 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Smoke tests
on:
push:
branches: [ "main" ]
pull_request:
jobs:
smoke:
runs-on: ubuntu-24.04
strategy:
fail-fast: false # finish all versions even if one fails
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# virtual screen (xvfb), a silent sound card (pulseaudio null sink), and PsychoPy's system libs
- name: System packages
run: |
sudo apt-get update
sudo apt-get install -y xvfb pulseaudio libasound2-plugins libportaudio2 libasound2t64 libsdl2-2.0-0 \
libgtk-3-0t64 libnotify4 libglu1-mesa libxkbcommon-x11-0 fonts-ubuntu \
libegl1 libxkbcommon0 libfontconfig1 libdbus-1-3 libx11-xcb1 libxcb-cursor0 \
libxcb-icccm4 libxcb-keysyms1 libxcb-shape0 ffmpeg
pulseaudio --start --exit-idle-time=-1
pactl load-module module-null-sink
printf 'pcm.!default pulse\nctl.!default pulse\n' > ~/.asoundrc
- name: Install MTB
run: |
python -m pip install --upgrade pip
pip install -e .
pip install pytest
# task stimuli from Zenodo, kept between runs so they download only once
- uses: actions/cache@v4
with:
path: ~/.cache/MultiTaskBattery
key: stimuli-${{ hashFiles('MultiTaskBattery/fetch.py') }}
- name: Fetch stimuli
run: mtb fetch
- name: Run smoke tests
# PsychoPy hides all speakers when GITHUB_WORKFLOW is set; unset it so the null sink is used
run: env -u GITHUB_WORKFLOW xvfb-run -a -s "-screen 0 1024x768x24" python -m pytest tests -v