From 3ce7afd4116a81d9f946f27e2f7f408588927f66 Mon Sep 17 00:00:00 2001 From: ankitdutta428 <159722886+ankitdutta428@users.noreply.github.com> Date: Tue, 14 Apr 2026 22:19:26 +0530 Subject: [PATCH] Updating the publish.yml for publishing --- .github/workflows/publish.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) 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