Update GitHub Actions workflows to install requirements and enforce n… #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
| name: Test PyHelios on Linux | |
| on: | |
| push: | |
| branches: [ "master", "main" ] | |
| pull_request: | |
| branches: [ "master", "main" ] | |
| jobs: | |
| test-linux: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies using Helios script | |
| run: | | |
| cd helios-core | |
| chmod +x utilities/dependencies.sh | |
| # Install BASE dependencies (includes build-essential, cmake) | |
| bash utilities/dependencies.sh BASE | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pytest pytest-cov pytest-xdist | |
| pip install -e . | |
| - name: Check PyHelios installation | |
| env: | |
| PYHELIOS_DEV_MODE: 1 | |
| run: | | |
| python -c "import pyhelios; print('PyHelios imported successfully')" | |
| python -c "from pyhelios.plugins import print_plugin_status; print_plugin_status()" | |
| - name: Run cross-platform tests (mock mode) | |
| env: | |
| PYHELIOS_DEV_MODE: 1 | |
| run: | | |
| pytest tests/ -v -m "cross_platform or unit" --tb=short | |
| - name: Run all tests including integration (expect skips for native tests) | |
| env: | |
| PYHELIOS_DEV_MODE: 1 | |
| run: | | |
| pytest tests/ -v --tb=short | |
| - name: Build native Helios libraries (optional) | |
| continue-on-error: true | |
| run: | | |
| python build_scripts/build_helios.py | |
| - name: Run native tests if libraries built successfully | |
| continue-on-error: true | |
| run: | | |
| pytest tests/ -v -m "native_only or integration" --tb=short | |
| - name: Generate coverage report | |
| if: matrix.python-version == '3.11' | |
| run: | | |
| pip install coverage | |
| pytest tests/ --cov=pyhelios --cov-report=xml --cov-report=html | |
| - name: Upload coverage to Codecov | |
| if: matrix.python-version == '3.11' | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| file: ./coverage.xml | |
| flags: linux | |
| name: codecov-linux |