Get rid of the realdisplaysizemm C-Extension #479
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened, ready_for_review, unlabeled] | |
branches: | |
- develop | |
jobs: | |
build: | |
name: Test with Python ${{ matrix.python-version }} and wxPython ${{ matrix.wx-version }} | |
env: | |
DISPLAY: :0 | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: False | |
matrix: | |
python-version: | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
- "3.12" | |
- "3.13" | |
wx-version: | |
- "4.1.1" | |
- "4.2.1" | |
- "4.2.2" | |
exclude: | |
- python-version: "3.11" | |
wx-version: "4.1.1" | |
- python-version: "3.12" | |
wx-version: "4.1.1" | |
- python-version: "3.12" | |
wx-version: "4.2.1" | |
- python-version: "3.13" | |
wx-version: "4.1.1" | |
- python-version: "3.13" | |
wx-version: "4.2.1" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set Environment Variables | |
run: | | |
echo "py_version=$(echo ${{ matrix.python-version }} | tr -d .)" >> $GITHUB_ENV | |
if [ "${{ matrix.python-version }}" == "3.8" ]; then | |
echo "add_dir_str=${{ matrix.python-version }}" >> $GITHUB_ENV | |
elif [ "${{ matrix.python-version }}" == "3.9" ]; then | |
echo "add_dir_str=${{ matrix.python-version }}" >> $GITHUB_ENV | |
elif [ "${{ matrix.python-version }}" == "3.10" ]; then | |
echo "add_dir_str=cpython-310" >> $GITHUB_ENV | |
elif [ "${{ matrix.python-version }}" == "3.11" ]; then | |
echo "add_dir_str=cpython-311" >> $GITHUB_ENV | |
elif [ "${{ matrix.python-version }}" == "3.12" ]; then | |
echo "add_dir_str=cpython-312" >> $GITHUB_ENV | |
elif [ "${{ matrix.python-version }}" == "3.13" ]; then | |
echo "add_dir_str=cpython-313" >> $GITHUB_ENV | |
fi | |
- name: Setup xvfb | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y xvfb \ | |
libxkbcommon-x11-0 \ | |
libxcb-icccm4 \ | |
libxcb-image0 \ | |
libxcb-keysyms1 \ | |
libxcb-randr0 \ | |
libxcb-render-util0 \ | |
libxcb-xinerama0 \ | |
libxcb-xinput0 \ | |
libxcb-xfixes0 | |
# start xvfb in the background | |
sudo /usr/bin/Xvfb $DISPLAY -screen 0 1280x1024x24 & | |
- name: Setup Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Update pip | |
run: | | |
sudo apt-get install -y $(grep -o ^[^#][[:alnum:]-]*.* "packages.list") | |
python3 -m pip install --upgrade pip | |
pip install wheel | |
- name: Install wxPython ${{ matrix.wx-version }} | |
run: | | |
pip install wxPython==${{ matrix.wx-version }} | |
- name: Install Python dependencies | |
run: | | |
pip install -r requirements-tests.txt | |
pip install -r requirements-dev.txt | |
- name: Build DisplayCAL | |
run: | | |
sudo chmod a+rw /etc/udev/rules.d | |
python3 -m build | |
pip install dist/DisplayCAL-*.whl | |
- name: Test with pytest | |
run: | | |
python -m pytest --verbose -n auto -W ignore --color=yes --cov=. --cov-report html | |
- name: Archive code coverage results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: code-coverage-report-${{ env.py_version }}-${{ matrix.wx-version }} | |
path: htmlcov | |
retention-days: 10 |