Merge pull request #96 from PhysFoley/main #159
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: Run Unit Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "ionerdss/**" | |
| - "tests/**" | |
| - ".github/workflows/unittest.yml" | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - "ionerdss/**" | |
| - "tests/**" | |
| - ".github/workflows/unittest.yml" | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.9" | |
| - name: Install system dependencies (Qt, OpenGL, EGL) | |
| run: | | |
| sudo apt update | |
| sudo apt install -y libegl1 libopengl0 libgl1-mesa-dev libxkbcommon-x11-0 qt6-base-dev | |
| - name: Install Python dependencies | |
| run: pip install -r requirements.txt | |
| - name: Set PYTHONPATH | |
| run: echo "PYTHONPATH=$PWD" >> $GITHUB_ENV | |
| - name: Install package (if setup.py exists) | |
| run: | | |
| if [ -f "setup.py" ]; then | |
| pip install -e . | |
| fi | |
| - name: Run unit tests | |
| run: pytest tests --junitxml=report.xml |