Skip to content

MedCAT-nightly-stability-check #48

MedCAT-nightly-stability-check

MedCAT-nightly-stability-check #48

name: MedCAT-nightly-stability-check
permissions:
contents: read
on:
schedule:
- cron: "0 3 * * *" # every day at 3am UTC
workflow_dispatch: # allow manual runs
pull_request:
paths:
- ".github/workflows/medcat-v2-lib-stability.yml"
defaults:
run:
working-directory: ./medcat-v2
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [ "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
- name: Install with latest deps
shell: bash
run: |
uv run --python ${{ matrix.python-version }} python -m ensurepip
uv run --python ${{ matrix.python-version }} python -m pip install --upgrade pip
# install cpu-only torch for MacOS
if [[ "$RUNNER_OS" == "macOS" ]]; then
uv run --python ${{ matrix.python-version }} python -m pip install torch --index-url https://download.pytorch.org/whl/cpu
fi
uv run --python ${{ matrix.python-version }} python -m pip install ".[spacy,deid,meta-cat,rel-cat,dict-ner,dev]"
- name: Check types
run: |
uv run --python ${{ matrix.python-version }} python -m mypy --follow-imports=normal medcat
- name: Ruff linting
run: |
uv run --python ${{ matrix.python-version }} python -m ruff check medcat --preview
- name: Test
run: |
uv run --python ${{ matrix.python-version }} python -m unittest discover
timeout-minutes: 45
- name: Model regression
run: |
uv run --python ${{ matrix.python-version }} bash tests/backwards_compatibility/run_current.sh