Skip to content

put comment back in requirements-dev #53

put comment back in requirements-dev

put comment back in requirements-dev #53

Workflow file for this run

# CI for this library is a bit tricky, as an working display/GFX card is
# expected to do the rendering. We use a fake display for Windows/Linux, and
# don't run CI on Mac. Running tests locally is simpler!
on: push
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [windows-latest]
python-ver: [3.7, 3.8]
experimental: [false]
exclude:
- os: windows-latest
python-ver: 3.8
include:
- python-ver: 3.8
os: windows-latest
experimental: true
- python-ver: 3.9
os: ubuntu-latest
experimental: true
- python-ver: 3.9
os: windows-latest
experimental: true
- python-ver: 3.9
os: macos-latest
experimental: true
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-ver }}
# VTK uses OpenGL 2.0, but the windows Server version used on
# GitHub actions only has 1.1, so need to setup software rendering
# with Mesa.
# https://github.com/pal1000/mesa-dist-win
- name: Setup Mesa (Windows)
if: matrix.os == 'windows-latest'
run: |
curl --output mesa.7z -L https://github.com/pal1000/mesa-dist-win/releases/download/20.1.1-2/mesa3d-20.1.1-release-mingw.7z
7z x mesa.7z -omesa -y
# The script requires user input (choice of options) so need to
# fiddle to get it to run automatically. Not a clean way to do it,
# but works.
sed -i 's/@echo Please make a deployment choice:/@GOTO desktopgl/g' mesa\systemwidedeploy.cmd
sed -i 's/@echo Desktop OpenGL drivers deploy complete./@exit/g' mesa\systemwidedeploy.cmd
mesa\systemwidedeploy.cmd
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pip-tools
pip install -r requirements-dev.txt
- name: Run tests using xvfb (Ubuntu)
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get install xvfb libxkbcommon-x11-0 libgl1 freeglut3-dev
sudo Xvfb :1 -screen 0 1024x768x24 </dev/null &
export DISPLAY=":1"
export LD_LIBRARY_PATH=$pythonLocation"/lib/python3.6/site-packages/PySide2/Qt/plugins/platfoms"
coverage erase
coverage run -a --source ./sksurgerytutorial01 -m pytest
coverage report -m
- name: Run tests Windows/Mac
if: contains(matrix.os, 'o')
run: |
coverage erase
coverage run -a --source ./sksurgerytutorial01 -m pytest
coverage report -m
- name: Linting
run: |
pylint --rcfile=tests/pylintrc sksurgerytutorial01
- name: Run coveralls
run: |
coveralls