bug fix #40
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 Tests | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install build dependencies and build binaries | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y cmake libgtest-dev | |
| pip install hatch | |
| pip install build | |
| ./build.sh | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install . # Install dependencies from pyproject.toml | |
| - name: Lint with Ruff | |
| run: | | |
| pip install ruff | |
| ruff check | |
| continue-on-error: true # Allow workflow to continue even if linting fails | |
| - name: Run Tests with pytest | |
| run: | | |
| pip install pytest pytest-cov pytest-mock | |
| pytest --cov=src/python --cov-report=xml -v test/ | |
| - name: Generate Coverage Report | |
| run: | | |
| coverage report -m | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} # Ensure you set this in GitHub Secrets | |
| files: coverage.xml | |
| verbose: true |