Skip to content

Merge pull request #1116 from zariiii9003/fix_pyinstaller #2181

Merge pull request #1116 from zariiii9003/fix_pyinstaller

Merge pull request #1116 from zariiii9003/fix_pyinstaller #2181

Workflow file for this run

name: tests
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on: [push, pull_request]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-22.04, macos-latest]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install packages
shell: bash
run: |
pip install tox tox-gh-actions
if [ "$RUNNER_OS" = "Linux" ]; then
sudo apt update
sudo apt-get install libegl1 libopengl0
sudo apt-get install '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev
sudo apt-get install libxcb-xinerama0
sudo apt-get install libxkbcommon-x11-0
sudo apt-get install xorg
sudo apt-get install -y xvfb
fi
- name: Start Xvfb
if: matrix.os == 'ubuntu-22.04'
run: |
Xvfb :0 -screen 0 1024x768x24 > /dev/null 2>&1 &
export DISPLAY=:0
touch ~/.Xauthority
Xvfb :0 -screen 0 1024x768x24 > /dev/null 2>&1 &
export DISPLAY=:0
# see: https://github.com/ymyzk/tox-gh-actions
- name: Run tests
run: tox
- uses: actions/upload-artifact@v4
if: failure() && matrix.os == 'windows-latest' # 'ubuntu-22.04' or 'windows-latest'
with:
path: "**/screenshots/**"
name: ${{ matrix.python-version }}
- name: Stop Xvfb
if: matrix.os == 'ubuntu-22.04'
run: killall Xvfb
- name: Publish Style Summary
if: ${{ failure() || success() }}
run: |
python -c "from ci import report_style; report_style()"
- name: Publish Tests Summary
if: ${{ failure() || success() }}
run: |
pip install junitparser
python -c "from ci import report_tests; report_tests(header='## Unit-tests Report:')"