@@ -3,13 +3,13 @@ name: Conda Package
33env :
44 # Note: The default Khiops version must never be an alpha release as they are
55 # ephemeral. To test alpha versions run the workflow manually.
6- DEFAULT_KHIOPS_CORE_VERSION : 10.3.0
6+ DEFAULT_KHIOPS_CORE_VERSION : 10.3.1
77 DEFAULT_SAMPLES_VERSION : 10.2.4
88on :
99 workflow_dispatch :
1010 inputs :
1111 khiops-core-version :
12- default : 10.3.0
12+ default : 10.3.1
1313 description : khiops-core version for testing
1414 khiops-samples-version :
1515 default : 10.2.4
7575 matrix :
7676 python-version : ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
7777 env :
78- - {os: ubuntu-20 .04, json-image: '{"image": null }'}
78+ - {os: ubuntu-22 .04, json-image: '{"image": "ubuntu:20.04" }'}
7979 - {os: ubuntu-22.04, json-image: '{"image": null}'}
80+ - {os: ubuntu-24.04, json-image: '{"image": null}'}
8081 - {os: ubuntu-22.04, json-image: '{"image": "rockylinux:8"}'}
8182 - {os: ubuntu-22.04, json-image: '{"image": "rockylinux:9"}'}
8283 - {os: windows-2019, json-image: '{"image": null}'}
@@ -117,7 +118,7 @@ jobs:
117118 PATH=$(echo $PATH | sed "s#$CONDA_PREFIX/bin:##g")
118119
119120 # Unset *CONDA* environment variables
120- # As a corrolary , CONDA_PREFIX is unset
121+ # As a corollary , CONDA_PREFIX is unset
121122 # Note: There is no way to remove these variables from GITHUB_ENV
122123 # (see https://github.com/actions/runner/issues/1126)
123124 for CONDA_VAR in $(env | grep CONDA)
@@ -131,17 +132,17 @@ jobs:
131132 run : |
132133 kh-download-datasets \
133134 --version ${{ inputs.khiops-samples-version || env.DEFAULT_SAMPLES_VERSION }}
134- - name : Test Conda Package on Samples
135+ - name : Run Samples
135136 env :
136137 # Force > 2 CPU cores to launch mpiexec
137138 KHIOPS_PROC_NUMBER : 4
138139 run : |
139- kh-samples core -i train_predictor -e
140+ kh-samples core -i deploy_model -e
141+ kh-samples core -i deploy_coclustering -e
140142 kh-samples core -i train_predictor_error_handling -e
141- kh-samples core -i train_coclustering -e
142143 kh-samples sklearn -i khiops_classifier -e
143144 kh-samples sklearn -i khiops_coclustering -e
144- - name : Test Conda Package on Some Samples (Conda-Based Environments)
145+ - name : Run Samples (Conda-Based Environments)
145146 env :
146147 # Force > 2 CPU cores to launch mpiexec
147148 KHIOPS_PROC_NUMBER : 4
@@ -153,18 +154,57 @@ jobs:
153154 PATH=$(echo $PATH | sed "s#$CONDA_PREFIX/bin:##g")
154155
155156 # Unset *CONDA* environment variables
156- # As a corrolary , CONDA_PREFIX is unset
157+ # As a corollary , CONDA_PREFIX is unset
157158 # Note: There is no way to remove these variables from GITHUB_ENV
158159 # (see https://github.com/actions/runner/issues/1126)
159160 for CONDA_VAR in $(env | grep CONDA)
160161 do
161162 unset $(echo $CONDA_VAR | cut -d '=' -f 1)
162163 done
163164
164- # Execute some Khiops and Khiops Coclustering samples
165+ # Run samples
165166 # Note: kh-samples is not reachable as it is not in PATH
166167 $PYTHON -m khiops.samples.samples -i deploy_model -e
167168 $PYTHON -m khiops.samples.samples -i deploy_coclustering -e
169+ $PYTHON -m khiops.samples.samples -i train_predictor_error_handling -e
170+ $PYTHON -m khiops.samples.samples_sklearn -i khiops_classifier -e
171+ $PYTHON -m khiops.samples.samples_sklearn -i khiops_coclustering -e
172+ # Checkout the sources to obtain the tests
173+ # Note: The `sparse-checkout` option of this action is bugged so we checkout all the sources
174+ # See https://github.com/actions/checkout/issues/1628
175+ - name : Checkout Sources
176+ uses : actions/checkout@v4
177+ with :
178+ fetch-depth : 1
179+ # This is needed so python does not retrieve the khiops module from PWD
180+ - name : Remove the khiops Module from the Sources
181+ run : rm -rf khiops
182+ - name : Install the Test Requirements
183+ run : conda install -y --file test-requirements.txt
184+ - name : Run the Runner Initialization Integration Test
185+ run : |
186+ python -m unittest -v \
187+ tests.test_khiops_integrations.KhiopsRunnerEnvironmentTests.test_runner_environment_initialization
188+ - name : Run the Runner Initialization Integration Test (Conda-Based Environments)
189+ run : |
190+ # Set `python` to the current Conda Python executable
191+ PYTHON="$(type -P python)"
192+
193+ # Remove $CONDA_PREFIX/bin from PATH
194+ PATH=$(echo $PATH | sed "s#$CONDA_PREFIX/bin:##g")
195+
196+ # Unset *CONDA* environment variables
197+ # As a corolary, CONDA_PREFIX is unset
198+ # Note: There is no way to remove these variables from GITHUB_ENV
199+ # (see https://github.com/actions/runner/issues/1126)
200+ for CONDA_VAR in $(env | grep CONDA)
201+ do
202+ unset $(echo $CONDA_VAR | cut -d '=' -f 1)
203+ done
204+
205+ # Execute the runner initialization integration test
206+ $PYTHON -m unittest -v \
207+ tests.test_khiops_integrations.KhiopsRunnerEnvironmentTests.test_runner_environment_initialization
168208
169209 # Release is only executed on tags
170210 # Note: For this job to work the secrets variables KHIOPS_ANACONDA_CHANNEL_TOKEN and
0 commit comments