Skip to content

gha

gha #51

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-20.04"
- "macos-11"
- "macos-12"
- "macos-13"
# - "windows-2019"
- "windows-2022"
python-version:
# - "3.12"
- "3.x"
include:
- python-version: "3.11"
os: ubuntu-22.04
- python-version: "3.12"
os: ubuntu-22.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 ubuntu dependencies
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update
#sudo apt-get install -y python3-setuptools
sudo apt-get install -y xvfb
sudo apt-get install -y python3-wxgtk4.0 python3-pyqt5
sudo apt-get install -y python3-tk python3-dialog python3-easygui zenity gmessage
# - name: Install ubuntu-20.04 dependencies
# if: matrix.os == 'ubuntu-20.04'
# run: |
# sudo apt-get install -y python3-pyside2.qtwidgets
- name: Install MacOS dependencies
if: startsWith(matrix.os, 'macos')
run: |
#brew install --cask xquartz
brew install wxpython pyqt@5 pyside@2 python-tk
#brew install imagemagick pqiv
#pip3 install wxpython pyobjc-framework-Quartz pyobjc-framework-LaunchServices
- name: Install Win dependencies
if: startsWith(matrix.os, 'win')
run: |
#choco install qt5-default -y
#choco install visualstudio2017buildtools -y
#choco install gtk-runtime -y
pip install pyqt5 wxpython easygui pywin32
- name: pip install
run: |
python3 --version
# python3 -m pip install pillow
python3 -m pip install .
python3 -m pip install -r requirements-test.txt
python3 -m pip install -r requirements-doc.txt
- name: print versions
run: |
python3 -m psidialogs.check.versions
- name: Test with pytest
run: |
cd tests
python3 -m pytest -v .
# TODO:
# - name: Lint
# if: matrix.os == 'ubuntu-20.04'
# run: |
# ./lint.sh
- name: screenshots
run: |
python3 doc/generate-screenshots.py --debug
- name: Archive production artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: screenshots-${{ matrix.os }}-${{ matrix.python-version }}
path: |
doc/gen/screenshots