File tree Expand file tree Collapse file tree 4 files changed +34
-5
lines changed
packaging/docker/khiopspydev Expand file tree Collapse file tree 4 files changed +34
-5
lines changed Original file line number Diff line number Diff line change @@ -454,7 +454,21 @@ jobs:
454454 echo "::error::Status error: improper setup, as expected: khiops-python has been cloned, not installed from a package"
455455 fi
456456
457- # Run integration tests on Ubuntu and Rocky
457+ # Run the library against an incompatible Khiops (with a different major version)
458+ # This instance of Khiops is isolated in a dedicated conda environment
459+ CONDA="/root/miniforge3/bin/conda"
460+ # Check an error is raised because of the major version mismatch
461+ # The khiops-python library from the cloned sources is used here
462+ $CONDA run -n py3_khiops10_conda python -c "import khiops.core as kh; print(kh.get_runner().khiops_version)" 2>&1 | grep -Ei 'major version.*?does not match'
463+ if [ $RETCODE -ne 0 ]; then
464+ echo "::error::Status error: khiops-python should fail because of the major version mismatch"
465+ if [[ "${{ matrix.container }}" == "debian13" ]]; then
466+ deactivate
467+ fi
468+ exit 1;
469+ fi
470+
471+ # Run the remaining integration tests
458472 python -m unittest -v tests.test_khiops_integrations
459473
460474 # Execute Khiops sample (train and deploy model), which uses MPI
Original file line number Diff line number Diff line change @@ -74,7 +74,12 @@ RUN true \
7474 $CONDA install -y -n py${version}_conda \
7575 khiops-driver-s3==${KHIOPS_S3_DRIVER_REVISION} \
7676 khiops-driver-gcs==${KHIOPS_GCS_DRIVER_REVISION}; \
77- done' \
77+ done; \
78+ # Install Khiops from a different major version in a dedicated conda environment \
79+ # The python interpreter version of the base environment is used as no specific version is given \
80+ $CONDA create -y -n py3_khiops10_conda; \
81+ $CONDA install -y -n py3_khiops10_conda khiops::khiops-core==10.3.1; \
82+ ' \
7883 && true
7984
8085RUN mkdir -p /scripts
Original file line number Diff line number Diff line change @@ -87,8 +87,13 @@ RUN true \
8787 do \
8888 $CONDA create -y -n $CONDA_ENV python=${version}; \
8989 done; \
90- $CONDA install -y -n py${version}_conda ${RC_LABEL}khiops-core=$(echo ${KHIOPS_REVISION} | tr -d "-") ; \
91- done' \
90+ $CONDA install -y -n py${version}_conda ${RC_LABEL}khiops-core==$(echo ${KHIOPS_REVISION} | tr -d "-") ; \
91+ done; \
92+ # Install Khiops from a different major version in a dedicated conda environment \
93+ # The python interpreter version of the base environment is used as no specific version is given \
94+ $CONDA create -y -n py3_khiops10_conda; \
95+ $CONDA install -y -n py3_khiops10_conda khiops::khiops-core==10.3.1; \
96+ ' \
9297 && true
9398
9499RUN mkdir -p /scripts
Original file line number Diff line number Diff line change @@ -72,7 +72,12 @@ RUN true \
7272 $CONDA install -y -n py${version}_conda \
7373 khiops-driver-s3==${KHIOPS_S3_DRIVER_REVISION} \
7474 khiops-driver-gcs==${KHIOPS_GCS_DRIVER_REVISION}; \
75- done' \
75+ done; \
76+ # Install Khiops from a different major version in a dedicated conda environment \
77+ # The python interpreter version of the base environment is used as no specific version is given \
78+ $CONDA create -y -n py3_khiops10_conda; \
79+ $CONDA install -y -n py3_khiops10_conda khiops::khiops-core==10.3.1; \
80+ ' \
7681 && true
7782
7883RUN mkdir -p /scripts
You can’t perform that action at this time.
0 commit comments