-
Notifications
You must be signed in to change notification settings - Fork 259
175 lines (150 loc) · 4.54 KB
/
run-tox.yml
File metadata and controls
175 lines (150 loc) · 4.54 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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
name: Run Tests
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
jobs:
membership:
# Install a specific combination of PySide/PyQt and python. Gather the
# available module.class member information and generate common membership.
runs-on: ubuntu-22.04
env:
QT_QPA_PLATFORM: minimal
QT_VERBOSE: 1
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup tox
uses: ./.github/actions/setup-tox
- name: Run Tox
# Gather membership data for each each Qt binding. This uses only one
# version of python to reduce the complexity of the output.
# membership-end combines binding/py data into common membership report
run: |
which tox
tox -e membership-py37-PySide5.13,membership-py37-PyQt5.13,membership-py39-PySide5.15,membership-py39-PyQt5.15,membership-py311-PySide6.5,membership-py311-PyQt6.7,membership-end
ls -lha .members
- name: Upload membership report
uses: actions/upload-artifact@v6
with:
name: membership-report
path: |
.members/
include-hidden-files: true
lint:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup tox
uses: ./.github/actions/setup-tox
- name: Run Tox
run: |
which tox
tox -e check
format:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup tox
uses: ./.github/actions/setup-tox
- name: Run Tox
run: |
which tox
tox -e format
stubs:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup tox
uses: ./.github/actions/setup-tox
- name: Run Tox
run: |
which tox
tox -e mypy
test:
runs-on: ubuntu-22.04
needs: membership
strategy:
matrix:
test_env: [
# Cy2020
'test-py37-PySide5.13',
'test-py37-PyQt5.13',
# Cy2021
'test-py37-PySide5.15',
'test-py37-PyQt5.15',
# Cy2022
'test-py39-PySide5.15',
'test-py39-PyQt5.15',
# Cy2023
'test-py310-PySide5.15',
'test-py310-PyQt5.15',
# Cy2024, Cy2025
'test-py311-PySide6.5',
'test-py311-PyQt6.5',
# Cy2026
'test-py313-PySide6.8',
'test-py313-PyQt6.8',
# Test newer versions of python/Qt than VFX Reference Platform has chosen
'test-py312-PySide6.8',
'test-py312-PyQt6.8',
'test-py314-PySide6.9',
'test-py314-PyQt6.9',
]
env:
QT_QPA_PLATFORM: minimal
QT_VERBOSE: 1
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup tox
uses: ./.github/actions/setup-tox
- name: Download coverage artifacts
# This is needed by the test_membership test
uses: actions/download-artifact@v7
with:
name: membership-report
path: .members
merge-multiple: true
- name: Display structure of downloaded files
run: ls -lha .members
- name: Tox Test - Implementation
# Note: `--skip-missing-interpreters` prevents false success if python
# version is not installed when testing.
run: |
which tox
tox --skip-missing-interpreters false -e test-begin,${{ matrix.test_env }}-impl
- name: Tox Test - Caveats
run: |
tox --skip-missing-interpreters false -e ${{ matrix.test_env }}-caveats
- name: Tox Test - Examples
run: |
tox --skip-missing-interpreters false -e ${{ matrix.test_env }}-examples
pip-package:
# Build and upload pip packages as artifacts so we can inspect them and
# ensure they are correct for actual release
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10.x"
- name: Install build dependency
run: python3 -m pip install --upgrade build
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Upload packages.
uses: actions/upload-artifact@v6
with:
name: pip-packages
path: |
dist/qt[._]py-*.whl
dist/qt[._]py-*.tar.gz