| name: pgmpy | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| name: Running tests - OS - ${{ matrix.os }}; Python - ${{ matrix.python-version}} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.12"] | |
| os: [ubuntu-latest, windows-latest, macOS-latest] | |
| group: [1, 2, 3] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{matrix.python-version}} | |
| cache: 'pip' | |
| cache-dependency-path: | | |
| **/requirements/*.txt | |
| - name: Print python info | |
| run: | | |
| which python | |
| python --version | |
| - name: Install dependencies | |
| run: | | |
| pip install pip -U | |
| pip install black -U | |
| pip install pytest-split | |
| pip install -r requirements.txt -U | |
| - name: Check formatting | |
| run: | | |
| black --diff . | |
| black --check . | |
| - name: Print package versions | |
| run: | | |
| pip freeze | |
| - name: Run tests | |
| run: pytest --cov-config .coveragerc --cov-report html --cov-report term --cov=pgmpy --splits 3 --group ${{ matrix.group }} --verbose | |