11---
22name : Unit Tests
33env :
4- DEFAULT_SAMPLES_REVISION : main
5- DEFAULT_KHIOPS_DESKTOP_REVISION : 10.2.3
4+ DEFAULT_SAMPLES_REVISION : 10.2.4
5+ DEFAULT_KHIOPS_DESKTOP_REVISION : 10.2.4
66on :
77 workflow_dispatch :
88 inputs :
99 samples-revision :
10- default : main
11- description : Git tag, branch or commit for the khiops-samples repository
10+ default : 10.2.4
11+ description : Git Tag/Branch/Commit for the khiops-samples Repo
1212 image-tag :
13- default : 10.2.3.0
13+ default : latest
1414 description : Development Docker Image Tag
1515 khiops-desktop-revision :
16- default : 10.2.3
16+ default : 10.2.4
1717 description : Khiops Windows Desktop Application Version
1818 run-long-tests :
1919 type : boolean
2020 required : false
2121 default : false
2222 description : Execute long tests
2323 pull_request :
24+ paths :
25+ - khiops/**.py
26+ - pykhiops/**.py # TODO: Remove for Khiops 11
27+ - tests/**.py
28+ - tests/resources/**
29+ - ' !tests/resources/**.md'
30+ - .github/workflows/unit-tests.yml
2431concurrency :
2532 group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
2633 cancel-in-progress : true
@@ -30,13 +37,13 @@ jobs:
3037 strategy :
3138 fail-fast : false
3239 matrix :
33- python-version : ['3.8', '3.9', '3.10', '3.11', '3.12']
40+ python-version : ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13' ]
3441 container :
3542 # 'latest' default image tag cannot be set as an environment variable,
3643 # because the `env` context is only accessible at the step level;
3744 # hence, it is hard-coded
3845 image : |-
39- ghcr.io/khiopsml/khiops-python/khiopspydev-ubuntu22.04:${{ inputs.image-tag || '10.2.3.0 ' }}
46+ ghcr.io/khiopsml/khiops-python/khiopspydev-ubuntu22.04:${{ inputs.image-tag || 'latest ' }}
4047 credentials :
4148 username : ${{ github.actor }}
4249 password : ${{ secrets.GITHUB_TOKEN }}
@@ -54,10 +61,10 @@ jobs:
5461 fetch-depth : 0
5562 # We move SAMPLES_REVISION to the environment so that we can use
5663 # them in both push and workflow_dispatch events
57- - name : Move SAMPLES_REVISION to the environment (push event)
58- if : github.event_name == 'push '
64+ - name : Set SAMPLES_REVISION on 'pull_request' events
65+ if : github.event_name == 'pull_request '
5966 run : echo "SAMPLES_REVISION=${DEFAULT_SAMPLES_REVISION}" >> "$GITHUB_ENV"
60- - name : Move SAMPLES_REVISION to the environment ( workflow_dispatch event)
67+ - name : Set SAMPLES_REVISION on ' workflow_dispatch' events
6168 if : github.event_name == 'workflow_dispatch'
6269 run : echo "SAMPLES_REVISION=${{ inputs.samples-revision }}" >> "$GITHUB_ENV"
6370 - name : Checkout Khiops samples
@@ -78,15 +85,15 @@ jobs:
7885 for CONDA_ENV in $CONDA_ENVS
7986 do
8087 mkdir -p -m u+rwx reports/"$CONDA_ENV"
81-
88+
8289 # install within the conda environments without activating them
8390 $CONDA install -y -n "$CONDA_ENV" unittest-xml-reporting
8491 $CONDA install -y -n "$CONDA_ENV" --file test-requirements.txt
8592 done
8693 - name : Install khiops-python dependencies
8794 if : success() || failure()
8895 run : |
89- # The following git command is required,
96+ # The following git command is required,
9097 # as the Git repository is in a directory the current user does not own,
9198 # Python versioneer fails to compute the current version correctly otherwise
9299 git config --global --add safe.directory $(realpath .)
96103 CONDA_ENVS="py${{ matrix.python-version }} py${{ matrix.python-version }}_conda"
97104 for CONDA_ENV in $CONDA_ENVS
98105 do
106+ # Since Python 3.13, setuptools is not installed automatically anymore
107+ $CONDA install -y -n "$CONDA_ENV" setuptools
99108 $CONDA run --no-capture-output -n "$CONDA_ENV" python setup.py egg_info
100109 $CONDA install -y -n "$CONDA_ENV" `grep -v "^\[" khiops.egg-info/requires.txt`
101110 rm -rf khiops.egg-info
@@ -199,7 +208,7 @@ jobs:
199208 - name : Install khiops-python dev dependencies
200209 shell : pwsh
201210 run : |
202- # The following git command is required,
211+ # The following git command is required,
203212 # as the Git repository is in a directory the current user does not own,
204213 # Python versioneer fails to compute the current version correctly otherwise
205214 git config --global --add safe.directory $(Resolve-Path '.' | % {$_.toString()})
@@ -222,6 +231,8 @@ jobs:
222231 shell : pwsh
223232 run : |
224233 $ErrorActionPreference = 'Stop'
234+ Set-StrictMode -Version Latest
235+ $PSNativeCommandUseErrorActionPreference = $true
225236
226237 # Refresh environment variables by using the Chocolatey tool
227238 # Otherwise, the env vars set in the registry by the Khiops installer do not get updated
@@ -237,7 +248,7 @@ jobs:
237248 # Print status
238249 Invoke-Expression -Command "$Python -c 'import khiops.core as kh; kh.get_runner().print_status()'"
239250
240- # Run integration tests on Ubuntu and Rocky
251+ # Run integration tests on Windows
241252 Invoke-Expression -Command "$Python -m unittest -v tests.test_khiops_integrations"
242253
243254 # Execute Khiops sample (train and deploy model)
@@ -256,7 +267,7 @@ jobs:
256267 # because the `env` context is only accessible at the step level;
257268 # hence, it is hard-coded
258269 image : |-
259- ghcr.io/khiopsml/khiops-python/khiopspydev-${{ matrix.container }}:${{ inputs.image-tag || '10.2.3.0 ' }}
270+ ghcr.io/khiopsml/khiops-python/khiopspydev-${{ matrix.container }}:${{ inputs.image-tag || 'latest ' }}
260271 credentials :
261272 username : ${{ github.actor }}
262273 password : ${{ secrets.GITHUB_TOKEN }}
@@ -281,7 +292,7 @@ jobs:
281292 path : khiops-samples
282293 - name : Install khiops-python dev dependencies
283294 run : |
284- # The following git command is required,
295+ # The following git command is required,
285296 # as the Git repository is in a directory the current user does not own,
286297 # Python versioneer fails to compute the current version correctly otherwise
287298 git config --global --add safe.directory $(realpath .)
0 commit comments