Skip to content

ParetoNBDModel population distribution sampling and save/load test #844

ParetoNBDModel population distribution sampling and save/load test

ParetoNBDModel population distribution sampling and save/load test #844

Workflow file for this run

name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
env:
OLDEST_PYMC_VERSION: "5.5.0"
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.11"]
oldest-pymc: [false, true]
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Run lint
uses: pre-commit/[email protected]
test:
runs-on: ubuntu-latest
strategy:
matrix:
config: [ {python-version: "3.8", oldest-pymc: false}, {python-version: "3.11", oldest-pymc: true}]
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.config.python-version }}
- name: Install oldest version of PyMC
if: ${{ matrix.config.oldest-pymc }}
run: pip install pymc==${{ env.OLDEST_PYMC_VERSION }}
- name: Run tests
run: |
pip install -e .[test]
pytest --cov-report=xml --no-cov-on-fail
- name: Check oldest version of PyMC
if: ${{ matrix.oldest-pymc }}
run: python -c "import pymc; assert pymc.__version__ == '${{ env.OLDEST_PYMC_VERSION }}'"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }} # use token for more robust uploads
name: ${{ matrix.python-version }}
fail_ci_if_error: false
all:
if: ${{ always() }}
runs-on: ubuntu-latest
name: All checks
needs: [ lint, test ]
steps:
- name: Confirm checks passed
if: ${{ (needs.lint.result != 'success' || needs.test.result != 'success') }}
run: exit 1