docs path fixed locally , fresh need testing #36
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: Automated Testing | |
| on: | |
| push: | |
| branches: [ "main", "master" ] | |
| pull_request: | |
| branches: [ "main", "master" ] | |
| jobs: | |
| test: | |
| name: Test & Get Coverage | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| language: [ 'python' ] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.10 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - name: Cache pip dependencies | |
| id: cache-pip | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml', 'requirements.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Install System Dependencies (Tkinter/XVFB) | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y python3-tk xvfb | |
| - name: Install Python and Project Dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pytest pytest-cov | |
| if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
| pip install -e . | |
| - name: Run All Tests and Generate Reports | |
| run: | | |
| echo "Running tests with coverage within a virtual display..." | |
| xvfb-run --auto-servernum pytest --cov=. --cov-report=xml --junitxml=junit.xml -o junit_family=legacy tests/ | |
| - name: Upload Coverage Report to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./coverage.xml | |
| fail_ci_if_error: true |