diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d6e4202..506ba54 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -25,17 +25,35 @@ jobs: with: python-version: ${{ matrix.python-version }} + # ADDED: System dependencies for Qt/GUI required by Ubuntu + - name: Install system dependencies (Ubuntu) + if: runner.os == 'Linux' + run: | + sudo apt-get update -qq + sudo apt-get install -y --no-install-recommends \ + libgl1 libglx-mesa0 libegl1 libegl-mesa0 \ + libxcb-xinerama0 libxcb-icccm4 libxcb-image0 \ + libxcb-render-util0 libxkbcommon-x11-0 \ + x11-utils xvfb + - name: Install dependencies run: | python -m pip install --upgrade pip pip install -r requirements.txt pip install pytest pytest-cov + # ADDED: Environment variables for headless Qt testing - name: Run ALL tests (library, API, scripts, integration) + env: + QT_QPA_PLATFORM: offscreen + DISPLAY: ":99" run: | python -m pytest tests/ -v --tb=short - name: Verify package imports + env: + QT_QPA_PLATFORM: offscreen + DISPLAY: ":99" run: | python -c "from src.core.flow_model import TwoPhaseFlowModel; print('Import OK')" @@ -95,4 +113,4 @@ jobs: - name: Publish to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: - password: ${{ secrets.PYPI_API_TOKEN }} + password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file