Skip to content

Small updates to debug the freezing functions. #128

Small updates to debug the freezing functions.

Small updates to debug the freezing functions. #128

Workflow file for this run

name: CI
on:
push:
branches: ["main", "feature/**", "features/**"]
pull_request:
branches: ["main"]
jobs:
unit-tests:
name: Unit tests (Python ${{ matrix.python-version }})
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@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install build and test dependencies
run: |
python -m pip install --upgrade pip
python -m pip install build pytest pytest-cov
- name: Install part2pop
run: |
python -m pip install -e .
- name: Run unit tests with coverage
run: |
pytest tests/unit --cov=part2pop --cov-report=xml --cov-report=term
- name: Upload coverage to Codecov
if: ${{ matrix.python-version == '3.11' }}
uses: codecov/codecov-action@v5
with:
files: ./coverage.xml
flags: unittests
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
integration-tests:
name: Integration tests (main & PRs only)
runs-on: ubuntu-latest
needs: unit-tests
if: ${{ github.event_name == 'pull_request' || github.ref == 'refs/heads/main' }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install build, test, and integration dependencies
run: |
python -m pip install --upgrade pip
python -m pip install build pytest
- name: Build and install part2pop
run: |
python -m build
python -m pip install dist/*.whl
- name: Run integration tests
run: |
pytest tests/integration
- name: Clean Python cache files
if: always()
run: |
find . -type d -name "__pycache__" -exec rm -r {} +
find . -type f -name "*.pyc" -delete