ecosystem-smoke #18
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
| # Nightly cross-package drift detector. | |
| # | |
| # Per-repo CI only runs when *that* repo is pushed, so a release in one | |
| # package can break another's tests invisibly — the victim's badge stays | |
| # green until its next push. (Exactly this happened when actuarialpy 0.44 | |
| # moved UnderwritingSummary to experiencestudies: extremeloss's | |
| # worked-example test kept a green badge while being latently broken.) | |
| # | |
| # This workflow re-runs every package's full test suite daily against | |
| # whatever its dependencies currently resolve to on PyPI, so ecosystem | |
| # drift surfaces within a day instead of at the next unrelated push. | |
| # | |
| # On a scheduled-run failure, GitHub emails the last committer of this | |
| # workflow file. Run it on demand with workflow_dispatch after any release. | |
| name: ecosystem-smoke | |
| on: | |
| schedule: | |
| - cron: "17 6 * * *" # daily, 06:17 UTC — off the top of the hour | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| smoke: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| repo: | |
| - actuarialpy | |
| - experiencestudies | |
| - projectionmodels | |
| - ratingmodels | |
| - lossmodels | |
| - extremeloss | |
| - risksim | |
| include: | |
| # Extras beyond [dev] that the repo's own CI installs. | |
| - repo: extremeloss | |
| extras: "dev,plot" | |
| - repo: actuarialpy | |
| extra-deps: "chainladder" | |
| name: ${{ matrix.repo }} | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 | |
| with: | |
| repository: OpenActuarial/${{ matrix.repo }} | |
| - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| cache-dependency-path: pyproject.toml | |
| - run: python -m pip install --upgrade pip | |
| # The checked-out source with its dev extras; every OpenActuarial | |
| # dependency resolves from PyPI at whatever is *currently released* — | |
| # which is the whole point of this workflow. | |
| - run: pip install -e ".[${{ matrix.extras || 'dev' }}]" | |
| - name: Cross-library deps | |
| if: matrix.extra-deps | |
| run: pip install ${{ matrix.extra-deps }} | |
| - name: Show resolved ecosystem versions | |
| run: pip list | grep -iE 'actuarialpy|experiencestudies|projectionmodels|ratingmodels|lossmodels|extremeloss|risksim' || true | |
| - run: pytest -q | |
| docs-linkcheck: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 | |
| - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| - run: pip install -r requirements.txt | |
| # Blocking here (nightly), unlike the informational check on push CI: | |
| # external link rot fails the smoke run, not an unrelated docs push. | |
| - run: python -m sphinx -b linkcheck docs docs/_linkcheck | |
| # The advertised one-command install, tested end to end against PyPI: | |
| # this is the job that catches partial publishes and floor drift before | |
| # any downstream repo's CI does. | |
| meta-package-smoke: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.13"] | |
| steps: | |
| - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install the full ecosystem from PyPI | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install openactuarial | |
| - name: Validate dependency metadata | |
| run: python -m pip check | |
| - name: Import every package | |
| run: | | |
| python - <<'PY' | |
| import actuarialpy | |
| import experiencestudies | |
| import projectionmodels | |
| import ratingmodels | |
| import lossmodels | |
| import extremeloss | |
| import risksim | |
| print("openactuarial", "->", "all seven import cleanly") | |
| PY | |
| # Known-vulnerability scan of the published train, on the same nightly | |
| # cadence as the smoke test. Audits what users actually install. | |
| audit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6 | |
| with: | |
| python-version: "3.12" | |
| - run: python -m pip install openactuarial pip-audit | |
| - run: pip-audit |