Merge pull request #220 from ssciwr/add_actinlint #500
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 | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
concurrency: | |
group: ci-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
ci: | |
runs-on: ${{ matrix.os }} | |
name: "${{ matrix.os }} :: Python ${{ matrix.python-version }}" | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-22.04", "windows-latest"] | |
python-version: ["3.8", "3.9", "3.10"] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Mesa 3D to get OpenGL support on Windows without a GPU | |
uses: ssciwr/setup-mesa-dist-win@v1 | |
- name: Linux setup | |
if: runner.os == 'Linux' | |
run: | | |
# various psychopy & qt system dependencies | |
sudo apt-get update -yy && sudo apt-get install -yy libasound2-dev portaudio19-dev libpulse-dev libusb-1.0-0-dev libsndfile1-dev libportmidi-dev liblo-dev libsdl2-mixer-2.0-0 libsdl2-image-2.0-0 libsdl2-2.0-0 freeglut3-dev scrot libnotify-dev pandoc libxcb-glx0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-render0 libxcb-shape0 libxcb-shm0 libxcb-sync1 libxcb-xfixes0 libxcb-xinerama0 libxcb-xinput0 libxcb-xkb1 libxcb1 libxkbcommon-x11-0 libxkbcommon0 libxrender1 | |
# install pre-built ubuntu/gtk3 wxPython wheel | |
pip install -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/${{ matrix.os }}/ wxPython | |
# enable colours in logs | |
echo "FORCE_COLOR=1" >> $GITHUB_ENV | |
echo "TERM=xterm-256color" >> $GITHUB_ENV | |
# psychopy requires that the python executable has permission to set its priority level | |
sudo setcap cap_sys_nice+ep `python -c "import os; import sys; print(os.path.realpath(sys.executable))"` | |
# start an Xvfb server for GUI tests | |
nohup Xvfb :99 -screen 0 1024x768x24 & | |
echo "DISPLAY=:99" >> $GITHUB_ENV | |
# see Qt debug output when loading plugins | |
echo "QT_DEBUG_PLUGINS=1" >> $GITHUB_ENV | |
- run: pip install -e .[tests,docs] --verbose | |
- run: python -m pytest --cov=vstt --cov-report=xml -v -s -x | |
- uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
path: "*.*" | |
- uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./coverage.xml | |
name: ${{ matrix.os }}-${{ matrix.python-version }} | |
fail_ci_if_error: true | |
verbose: true |