-
Notifications
You must be signed in to change notification settings - Fork 62
158 lines (130 loc) · 4.96 KB
/
run-tests-workflow.yml
File metadata and controls
158 lines (130 loc) · 4.96 KB
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
name : Run tests
on: [push, pull_request]
jobs:
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 5
env:
PYTHONFAULTHANDLER: 1
PIP_NO_PIP_VERSION_CHECK: 1
PIP_CACHE_DIR: .pip-cache
PIP_PREFER_BINARY: 1
UBUNTU_SYSTEM_PACKAGES: |
libxkbcommon-x11-0
libxcb-icccm4
libxcb-image0
libxcb-keysyms1
libxcb-randr0
libxcb-render-util0
libxcb-xinerama0
libxcb-xfixes0
libegl1
libxcb-shape0
libxcb-cursor0
glibc-tools
strategy:
fail-fast: False
matrix:
include:
# Linux
- os: ubuntu-22.04
python-version: "3.10"
test-env: "PyQt5~=5.15.0 PyQtWebEngine~=5.15.0"
- os: ubuntu-22.04
python-version: "3.11"
test-env: "PyQt5~=5.15.0 PyQtWebEngine~=5.15.0"
- os: ubuntu-22.04
python-version: "3.11"
test-env: "PyQt6~=6.5.0 PyQt6-Qt6~=6.5.0 PyQt6-WebEngine~=6.5.0 PyQt6-WebEngine-Qt6~=6.5.0"
- os: ubuntu-latest
python-version: "3.12"
test-env: "PyQt6~=6.5.0 PyQt6-Qt6~=6.5.0 PyQt6-WebEngine~=6.5.0 PyQt6-WebEngine-Qt6~=6.5.0"
- os: ubuntu-latest
python-version: "3.13"
test-env: "PyQt6~=6.8.0 PyQt6-Qt6~=6.8.0 PyQt6-WebEngine~=6.8.0 PyQt6-WebEngine-Qt6~=6.8.0"
- os: ubuntu-latest
python-version: "3.14"
test-env: "PyQt6~=6.9.0 PyQt6-Qt6~=6.9.0 PyQt6-WebEngine~=6.9.0 PyQt6-WebEngine-Qt6~=6.9.0"
# macOS
- os: macos-14
python-version: "3.10"
test-env: "PyQt5~=5.15.0 PyQtWebEngine~=5.15.0"
- os: macos-14
python-version: "3.11"
test-env: "PyQt6~=6.5.0 PyQt6-Qt6~=6.5.0 PyQt6-WebEngine~=6.5.0 PyQt6-WebEngine-Qt6~=6.5.0"
- os: macos-latest
python-version: "3.12"
test-env: "PyQt6~=6.5.0 PyQt6-Qt6~=6.5.0 PyQt6-WebEngine~=6.5.0 PyQt6-WebEngine-Qt6~=6.5.0"
- os: macos-latest
python-version: "3.13"
test-env: "PyQt6~=6.8.0 PyQt6-Qt6~=6.8.0 PyQt6-WebEngine~=6.8.0 PyQt6-WebEngine-Qt6~=6.8.0"
- os: macos-latest
python-version: "3.14"
test-env: "PyQt6~=6.9.0 PyQt6-Qt6~=6.9.0 PyQt6-WebEngine~=6.9.0 PyQt6-WebEngine-Qt6~=6.9.0"
# Windows
- os: windows-2022
python-version: "3.10"
test-env: "PyQt5~=5.15.0 PyQtWebEngine~=5.15.0"
- os: windows-2022
python-version: "3.11"
test-env: "PyQt5~=5.15.0 PyQtWebEngine~=5.15.0"
- os: windows-2022
python-version: "3.11"
test-env: "PyQt6~=6.5.0 PyQt6-Qt6~=6.5.0 PyQt6-WebEngine~=6.5.0 PyQt6-WebEngine-Qt6~=6.5.0"
- os: windows-latest
python-version: "3.12"
test-env: "PyQt6~=6.5.0 PyQt6-Qt6~=6.5.0 PyQt6-WebEngine~=6.5.0 PyQt6-WebEngine-Qt6~=6.5.0"
- os: windows-latest
python-version: "3.13"
test-env: "PyQt6~=6.8.0 PyQt6-Qt6~=6.8.0 PyQt6-WebEngine~=6.8.0 PyQt6-WebEngine-Qt6~=6.8.0"
- os: windows-latest
python-version: "3.14"
test-env: "PyQt6~=6.9.0 PyQt6-Qt6~=6.9.0 PyQt6-WebEngine~=6.9.0 PyQt6-WebEngine-Qt6~=6.9.0"
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install System Deps
if: ${{ startsWith(runner.os, 'Linux') }}
env:
PACKAGES: ${{ matrix.extra-system-packages }}
# https://www.riverbankcomputing.com/pipermail/pyqt/2020-June/042949.html
run: |
sudo apt-get update
sudo apt-get install -y $UBUNTU_SYSTEM_PACKAGES $PACKAGES
- name: Setup Pip Cache
uses: actions/cache@v4
with:
path: .pip-cache
key: ${{ runner.os }}-py-${{ matrix.python-version }}-pip-${{ hashFiles('setup.*', '.github/workflows/run-tests-workflow.yml') }}
restore-keys: |
${{ runner.os }}-py-${{ matrix.python-version }}-pip
- name: Install Test Deps
env:
TEST_ENV: ${{ matrix.test-env }}
TEST_DEPS: wheel coverage
run: python -m pip install $TEST_DEPS $TEST_ENV
shell: bash
- name: Install
run: python -m pip install -e .
- name: List Test Env
run: pip list --format=freeze
- name: Run Tests
if: ${{ !startsWith(runner.os, 'Linux') }}
run: |
coverage run -m unittest -v
coverage xml
shell: bash
- name: Run Tests with Xvfb
if: ${{ startsWith(runner.os, 'Linux') }}
env:
XVFBARGS: "-screen 0 1280x1024x24"
run: |
catchsegv xvfb-run -a -s "$XVFBARGS" coverage run -m unittest -v
coverage xml
- name: Upload Coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}