Fix workflow figure #6
This file contains hidden or 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
| # This workflow will install Python dependencies, run tests and lint with multiple versions of Python | |
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
| name: CI | |
| on: [push] | |
| permissions: | |
| contents: read | |
| jobs: | |
| ubuntu: | |
| name: ubuntu | |
| runs-on: [ubuntu-latest] | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| env: | |
| QT_QPA_PLATFORM: offscreen | |
| DISPLAY: ':99.0' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Display Path and Python version | |
| run: | | |
| python -c "import sys, platform; print(sys.version, platform.system())" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install flake8 pytest | |
| if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
| - name: Lint with flake8 | |
| run: | | |
| # stop the build if there are Python syntax errors or undefined names | |
| flake8 ./pypef --count --select=E9,F63,F7,F82 --show-source --statistics | |
| - name: Export Pythonpath and run tests using the main script | |
| run: | | |
| export PYTHONPATH="${PYTHONPATH}:${PWD}" && python -m pytest ./tests/ -v -m "not pip_specific" | |
| - name: Export Pythonpath and run tests using pip-installation | |
| run: | | |
| export PYTHONPATH="" | |
| sudo apt update | |
| sudo apt install -y libegl1 xvfb \ | |
| libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 \ | |
| libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 | |
| Xvfb :99 -screen 0 1920x1080x24 -ac & | |
| sleep 3 | |
| pip install .[gui] | |
| echo $(which pypef) | |
| python -m pytest ./tests/ -v -m "not main_script_specific" --log-cli-level=INFO | |
| windows: | |
| name: windows | |
| runs-on: [windows-latest] | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| env: | |
| QT_QPA_PLATFORM: offscreen | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Display Path and Python version | |
| run: | | |
| python -c "import sys, platform; print(sys.version, platform.system())" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install flake8 pytest | |
| pip install -r requirements.txt | |
| - name: Lint with flake8 | |
| run: | | |
| # stop the build if there are Python syntax errors or undefined names | |
| flake8 .\pypef --count --select=E9,F63,F7,F82 --show-source --statistics | |
| - name: Export Pythonpath and run tests using the main script | |
| shell: pwsh | |
| run: | | |
| $env:PYTHONPATH = "${PWD};${env:PYTHONPATH}";python -m pytest .\tests\ -v -m "not pip_specific" | |
| - name: Export Pythonpath and run tests using pip-installation | |
| shell: pwsh | |
| run: | | |
| $env:PYTHONPATH = "" | |
| pip install .[gui] | |
| echo (Get-Command pypef).Source | |
| python -m pytest .\tests -v -m "not main_script_specific" --log-cli-level=INFO | |