Skip to content

Commit b9084ca

Browse files
committed
Maybe move test run to a separate script
1 parent c2aa854 commit b9084ca

3 files changed

Lines changed: 26 additions & 25 deletions

File tree

.github/workflows/main.yml

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -73,31 +73,10 @@ jobs:
7373
version: "0.8.3"
7474
enable-cache: false
7575

76-
- name: Install XVFB
76+
- name: Test all python/qt combinations
7777
uses: coactions/setup-xvfb@v1
78-
79-
- name: Test all Python/Qt combinations
80-
run: |
81-
PYTHON_VERSIONS=("3.10", "3.11")
82-
QT_VERSIONS=("pyside2", "pyside6", "pyqt5", "pyqt6")
83-
84-
for PY in "${PYTHON_VERSIONS[@]}"; do
85-
uv venv --clear
86-
uv python pin "$PY"
87-
for QT in "${QT_VERSIONS[@]}"; do
88-
89-
# pyside2 requires python <3.11
90-
if [[ "$QT" == "pyside2" && ( "$PY" == "3.11" || "$PY" == "3.12" || "$PY" == "3.13" ) ]]; then continue; fi
91-
# pyside6 and pyqt6 require python >=3.9
92-
if [[ "$QT" == "pyside6" || "$QT" == "pyqt6" ]] && [[ "$PY" == "3.8" ]]; then continue; fi
93-
94-
uv sync --locked --dev
95-
uv pip install "$QT"
96-
97-
QT_API="$QT" /usr/bin/xvfb-run --auto-servernum \
98-
uv run coverage run -m pytest --verbose tests/
99-
done
100-
done
78+
with:
79+
run: ./testall.sh
10180

10281
# combine-coverage:
10382
# needs: tests

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ venvPath = "."
6565
venv = ".venv"
6666

6767
[tool.pytest.ini_options]
68-
addopts = "-n auto"
68+
# addopts = "-n auto"
6969
markers = ["raises"]
7070
testpaths = ["tests"]
7171

testall.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/usr/bin/env bash
2+
3+
PYTHON_VERSIONS=("3.10" "3.11")
4+
QT_VERSIONS=("pyside2" "pyside6") # "pyqt5" "pyqt6")
5+
OS_NAME="${GITHUB_MATRIX_OS:-$(uname | tr '[:upper:]' '[:lower:]')}"
6+
7+
for PY in "${PYTHON_VERSIONS[@]}"; do
8+
uv venv --clear
9+
uv python pin "$PY"
10+
for QT in "${QT_VERSIONS[@]}"; do
11+
12+
# pyside2 requires python <3.11
13+
if [[ "$QT" == "pyside2" && ("$PY" == "3.11" || "$PY" == "3.12" || "$PY" == "3.13") ]]; then continue; fi
14+
# pyside6 and pyqt6 require python >=3.9
15+
if [[ "$QT" == "pyside6" || "$QT" == "pyqt6" ]] && [[ "$PY" == "3.8" ]]; then continue; fi
16+
17+
uv sync --locked --dev
18+
uv pip install "$QT"
19+
20+
QT_API="$QT" uv run coverage run -m pytest --verbose tests/ || true
21+
done
22+
done

0 commit comments

Comments
 (0)