More bug fixes #220
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
# Unit testing to replace Travis CI, runs existing pytest script. Based on PsychoPy's own CI test system. | |
name: pytest | |
on: [push, pull_request] | |
permissions: | |
contents: read | |
jobs: | |
testsuite_ubuntu: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false # debugging builds lets see them all! | |
matrix: | |
os: [ ubuntu-latest ] | |
python-version: [ 3.8 ] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: get_month | |
if: runner.os=='Linux' | |
id: month | |
run: echo "::set-output name=month::$(date +'%Y-%m')" | |
- name: cache wxPython for linux | |
if: runner.os=='Linux' | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache/pip | |
key: ${{ matrix.os }}-py${{ matrix.python-version }}-${{ steps.get_month.outputs.month }} | |
- name: Install apt-get dependencies | |
if: runner.os=='Linux' | |
run: | | |
# mostly for wxPython: | |
sudo apt-get update | |
sudo apt-get install -y -qq python3-dev libgtk-3-dev | |
sudo apt-get install -y -qq libgstreamer1.0-0 gstreamer1.0-plugins-base | |
sudo apt-get install -y -qq libwebkit2gtk-4.0-dev | |
sudo apt-get install -y -qq libpng-dev libjpeg-dev libtiff-dev libnotify-dev libsm-dev | |
sudo apt-get install -y -qq libsdl2-dev libsdl2-mixer-2.0-0 libsdl2-image-2.0-0 libsdl2-2.0-0 | |
sudo apt-get install -y -qq libportaudio2 | |
# virtual frame buffer | |
#sudo apt install llvm-6.0-dev # for xvfb | |
#sudo apt install xvfb xauth libgl1-mesa-dri | |
# set up fake sound device? | |
sudo apt-get install -y -qq libasound2-dev alsa-utils alsa-oss | |
sudo apt-get install -y linux-modules-extra-$(uname -r) # needed for modprobe snd-dummy | |
sudo sh .github/workflows/prep_dummy_soundcard.sh # Try this again. | |
# for PyQt: | |
sudo apt-get install -y -qq libdbus-1-3 libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 | |
sudo apt-get install -y -qq libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 | |
export LIBGL_ALWAYS_INDIRECT=0 | |
export QT_DEBUG_PLUGINS=1 # let us know about missing dependencies? | |
- name: Install wxPython from source for linux | |
if: runner.os=='Linux' | |
run: | | |
# these are needed to build wxPython | |
pip install pip install -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-20.04/ wxPython | |
- name: Install packaging and testing libs | |
run: | | |
python -m pip install --upgrade pip | |
pip install pytest pytest-cov flake8 xmlschema | |
pip install wheel | |
pip install six # for configobj and wxpython | |
pip install distro # used by createInitFile | |
pip install mock | |
pip install psychopy | |
- name: Test with Pytest | |
run: | | |
xvfb-run -a --server-args="-screen 0 1024x768x24" pytest |