-
Notifications
You must be signed in to change notification settings - Fork 74
126 lines (121 loc) · 3.5 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# GH Actions script to test Pyzo.
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
lint-build:
name: Test linting
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dev dependencies
run: |
python -m pip install --upgrade pip
pip install -U black flake8 flake8-black
- name: Flake8
run: |
flake8 .
test-builds:
name: Test ${{ matrix.os }} py${{ matrix.pyversion }} ${{ matrix.qtlib }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# Main test builds, 3 OS's times 4 Qt toolkits
- os: windows-latest
pyversion: '3.12'
qtlib: pyside6!=6.7.0
- os: windows-latest
pyversion: '3.11'
qtlib: pyqt6
- os: windows-latest
pyversion: '3.10'
qtlib: pyqt5
- os: windows-latest
pyversion: '3.9'
qtlib: pyside2
# ---
- os: ubuntu-latest
pyversion: '3.12'
qtlib: pyside6!=6.7.0
- os: ubuntu-latest
pyversion: '3.11'
qtlib: pyqt6
- os: ubuntu-latest
pyversion: '3.10'
qtlib: pyqt5
- os: ubuntu-latest
pyversion: '3.9'
qtlib: pyside2
# ---
- os: macos-latest
pyversion: '3.12'
qtlib: 'pyside6==6.6.0'
- os: macos-latest
pyversion: '3.11'
qtlib: pyqt6
- os: macos-latest
pyversion: '3.10'
qtlib: pyqt5
# --- PySide2 requires macOS with Intel CPU
- os: macos-12 # ... has Intel instead of Apple Silicon
pyversion: '3.9'
qtlib: pyside2
# --- Older Python versions and qt libs
- os: windows-latest
pyversion: '3.6'
qtlib: pyside6
- os: windows-latest
pyversion: '3.8'
qtlib: pyside6
- os: windows-latest
pyversion: '3.9'
qtlib: pyside6!=6.7.0
steps:
- uses: actions/checkout@v3
- name: Setup os
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt update
sudo apt install libegl1-mesa
- name: Set up Python ${{ matrix.pyversion }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.pyversion }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U pytest>=7.0.1
pip install -U ${{ matrix.qtlib }}
- name: Install in development mode
run: |
pip install -e .
- name: Test on repo
run: |
pytest -v tests
- name: Prepare run
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt install -y libdbus-1-3 libxkbcommon-x11-0 libxcb-icccm4 \
libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 \
libxcb-xinerama0 libxcb-xfixes0 libxcb-shape0 libxcb-cursor0
- name: Run Pyzo (linux)
if: matrix.os == 'ubuntu-latest'
run: |
xvfb-run --auto-servernum python pyzolauncher.py --test
python tests/check_log.py
- name: Run Pyzo
if: matrix.os != 'ubuntu-latest'
run: |
python pyzolauncher.py --test
python tests/check_log.py