Skip to content

Python package

Python package #92

Workflow file for this run

# For more information see:
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Python package
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '30 5 1 */3 *'
push:
pull_request:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- "ubuntu-22.04"
- "macos-11"
- "macos-12"
- "macos-13"
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
include:
- python-version: "3.6"
os: ubuntu-20.04
- python-version: "3.7"
os: ubuntu-20.04
- python-version: "3.8"
os: ubuntu-20.04
- python-version: "3.9"
os: ubuntu-20.04
- python-version: "3.10"
os: ubuntu-20.04
- python-version: "3.11"
os: ubuntu-20.04
- python-version: "3.12"
os: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Linux dependencies
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install -y tigervnc-standalone-server tightvncserver xserver-xephyr gnumeric x11-utils
- name: Install MacOS dependencies
if: startsWith(matrix.os, 'macos')
run: |
brew install --cask xquartz
# https://docs.github.com/en/actions/learn-github-actions/workflow-commands-for-github-actions#adding-a-system-path
echo "/opt/X11/bin" >> $GITHUB_PATH
# https://github.com/ponty/PyVirtualDisplay/issues/42
# mkdir /tmp/.X11-unix
# sudo chmod 1777 /tmp/.X11-unix
# sudo chown root /tmp/.X11-unix
- name: Xvfb -help
run: |
Xvfb -help
- name: pip install
run: |
python -m pip install .
pip install -r requirements-test.txt
- name: Test with pytest
run: |
cd tests
pytest -v .
# - name: Lint
# if: matrix.os == 'ubuntu-20.04'
# run: |
# ./lint.sh