@@ -458,46 +458,12 @@ jobs:
458458 retention-days : 30
459459
460460 # =============================================================================
461- # Step 4: Publish to TestPyPI (workflow_dispatch only)
461+ # Step 4: Test built wheels on all platforms
462462 # =============================================================================
463- publish-testpypi :
464- name : Publish to TestPyPI
463+ test-wheels :
464+ name : Test wheel - ${{ matrix.os }}
465465 needs : [merge-artifacts]
466466 if : always() && needs.merge-artifacts.result == 'success' && github.event_name == 'workflow_dispatch'
467- runs-on : ubuntu-24.04
468- defaults :
469- run :
470- working-directory : .
471- environment :
472- name : testpypi
473- url : https://test.pypi.org/p/pywry
474- permissions :
475- id-token : write
476-
477- steps :
478- - name : Download dist artifacts
479- uses : actions/download-artifact@v4
480- with :
481- name : dist
482- path : dist/
483-
484- - name : Display dist contents
485- run : ls -la dist/
486-
487- - name : Publish to TestPyPI
488- uses : pypa/gh-action-pypi-publish@release/v1
489- with :
490- repository-url : https://test.pypi.org/legacy/
491- print-hash : true
492- skip-existing : true
493-
494- # =============================================================================
495- # Step 5: Test package from TestPyPI on all platforms
496- # =============================================================================
497- test-testpypi :
498- name : Test from TestPyPI - ${{ matrix.os }}
499- needs : [merge-artifacts, publish-testpypi]
500- if : always() && needs.publish-testpypi.result == 'success' && github.event_name == 'workflow_dispatch'
501467 runs-on : ${{ matrix.os }}
502468 permissions :
503469 contents : read
@@ -578,23 +544,44 @@ jobs:
578544 echo "OPENSSL_DIR=$opensslDir" >> $env:GITHUB_ENV
579545 }
580546
581- - name : Wait for TestPyPI propagation
582- run : sleep 60
547+ - name : Download dist artifacts
548+ uses : actions/download-artifact@v4
549+ with :
550+ name : dist
551+ path : dist/
583552
584- - name : Install from TestPyPI
553+ - name : Install from built wheel with dev dependencies
585554 shell : bash
586555 run : |
587- pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ pywry==${{ needs.merge-artifacts.outputs.version }}
556+ pip install --find-links dist/ " pywry[dev] ==${{ needs.merge-artifacts.outputs.version }}"
588557
589558 - name : Verify installation
590559 shell : bash
591560 run : |
592- python -c "import pywry; print(f'✅ pywry {pywry.__version__} installed successfully')"
593- python -c "from pywry import PyWry; print('✅ PyWry class imported')"
594- python -c "from pywry.toolbar import Button, Toolbar; print('✅ Toolbar components imported')"
561+ python -c "import pywry; print(f'pywry {pywry.__version__} installed successfully')"
562+ python -c "from pywry import PyWry; print('PyWry class imported')"
563+ python -c "from pywry.toolbar import Button, Toolbar; print('Toolbar components imported')"
564+
565+ - name : Run tests (Linux)
566+ if : runner.os == 'Linux'
567+ working-directory : pywry
568+ env :
569+ PYWRY_HEADLESS : " 1"
570+ NO_AT_BRIDGE : " 1"
571+ run : |
572+ dbus-run-session -- xvfb-run --auto-servernum --server-args="-screen 0 1920x1080x24" python -m pytest -c pytest.ini tests/ -v --tb=short -x
573+
574+ - name : Run tests (Windows/macOS)
575+ if : runner.os != 'Linux'
576+ working-directory : pywry
577+ env :
578+ PYWRY_HEADLESS : " 1"
579+ PYWRY_DEPLOY__STATE_BACKEND : " memory"
580+ run : |
581+ python -m pytest -c pytest.ini tests/ -v --tb=short -x --ignore=tests/test_state_redis_integration.py --ignore=tests/test_auth_rbac_integration.py --ignore=tests/test_deploy_mode_integration.py --ignore=tests/test_e2e_deploy_mode.py --ignore=tests/test_e2e_rbac_widgets.py -m "not redis and not container"
595582
596583 # =============================================================================
597- # Step 6 : Create draft release with all artifacts (workflow_dispatch only)
584+ # Step 5 : Create draft release with all artifacts (workflow_dispatch only)
598585 # =============================================================================
599586 create-release :
600587 name : Create Draft Release
@@ -659,7 +646,7 @@ jobs:
659646 *This is a draft release. Review and publish to trigger PyPI upload.*
660647
661648 # =============================================================================
662- # Step 7 : Publish to PyPI (on release publish) - Trusted Publisher
649+ # Step 6 : Publish to PyPI (on release publish) - Trusted Publisher
663650 # =============================================================================
664651 publish-pypi :
665652 name : Publish to PyPI
@@ -668,9 +655,6 @@ jobs:
668655 defaults :
669656 run :
670657 working-directory : .
671- environment :
672- name : pypi
673- url : https://pypi.org/p/pywry
674658 permissions :
675659 id-token : write
676660
0 commit comments