2
2
name : Unit Tests
3
3
env :
4
4
DEFAULT_SAMPLES_REVISION : main
5
- DEFAULT_KHIOPS_DESKTOP_REVISION : 10.2.3-b.3
5
+ DEFAULT_KHIOPS_DESKTOP_REVISION : 10.2.3-b.4
6
6
on :
7
7
workflow_dispatch :
8
8
inputs :
13
13
default : latest
14
14
description : Development Docker Image Tag
15
15
khiops-desktop-revision :
16
- default : 10.2.3-b.3
16
+ default : 10.2.3-b.4
17
17
description : Khiops Windows Desktop Application Version
18
18
run-long-tests :
19
19
type : boolean
36
36
# because the `env` context is only accessible at the step level;
37
37
# hence, it is hard-coded
38
38
image : |-
39
- ghcr.io/khiopsml/khiops-python/khiopspydev-ubuntu22.04:${{ inputs.image-tag || '10.2.3-b.4.with_native_10 .2.3-b.4' }}
39
+ ghcr.io/khiopsml/khiops-python/khiopspydev-ubuntu22.04:${{ inputs.image-tag || '10.2.3-b.4.with_conda-forge_10 .2.3-b.4' }}
40
40
credentials :
41
41
username : ${{ github.actor }}
42
42
password : ${{ secrets.GITHUB_TOKEN }}
@@ -70,29 +70,36 @@ jobs:
70
70
- name : Setup and Install Test Requirements
71
71
if : success() || failure()
72
72
run : |
73
- mkdir -p -m u+rwx reports/py${{ matrix.python-version }}
74
- mkdir -p -m u+rwx reports/py${{ matrix.python-version }}_conda
75
- # install within the conda environments without activating them
76
- # Native Khiops-based Conda environment
77
- /root/miniconda3/bin/conda install -y -n py${{ matrix.python-version }} -c conda-forge unittest-xml-reporting
78
- /root/miniconda3/bin/conda install -y -n py${{ matrix.python-version }} --file test-requirements.txt
73
+ CONDA="/root/miniforge3/bin/conda"
74
+
75
+ # Native Khiops-based Conda environment, and
79
76
# `khiops-core`-based Conda environment
80
- /root/miniconda3/bin/conda install -y -n py${{ matrix.python-version }}_conda -c conda-forge unittest-xml-reporting
81
- /root/miniconda3/bin/conda install -y -n py${{ matrix.python-version }}_conda --file test-requirements.txt
77
+ CONDA_ENVS="py${{ matrix.python-version }} py${{ matrix.python-version }}_conda"
78
+ for CONDA_ENV in $CONDA_ENVS
79
+ do
80
+ mkdir -p -m u+rwx reports/"$CONDA_ENV"
81
+
82
+ # install within the conda environments without activating them
83
+ $CONDA install -y -n "$CONDA_ENV" unittest-xml-reporting
84
+ $CONDA install -y -n "$CONDA_ENV" --file test-requirements.txt
85
+ done
82
86
- name : Install khiops-python dependencies
83
87
if : success() || failure()
84
88
run : |
85
89
# The following git command is required,
86
90
# as the Git repository is in a directory the current user does not own,
87
91
# Python versioneer fails to compute the current version correctly otherwise
88
- git config --global --add safe.directory $(realpath .)
89
- # Native Khiops-based Conda environment
90
- /root/miniconda3/bin/conda run --no-capture-output -n py${{ matrix.python-version }} python setup.py egg_info
91
- /root/miniconda3/bin/conda install -y -n py${{ matrix.python-version }} `grep -v "^\[" khiops.egg-info/requires.txt`
92
+ git config --global --add safe.directory $(realpath .)
93
+ CONDA="/root/miniforge3/bin/conda"
94
+ # Native Khiops-based Conda environment, and
92
95
# `khiops-core`-based Conda environment
93
- /root/miniconda3/bin/conda run --no-capture-output -n py${{ matrix.python-version }}_conda python setup.py egg_info
94
- /root/miniconda3/bin/conda install -y -n py${{ matrix.python-version }}_conda `grep -v "^\[" khiops.egg-info/requires.txt`
95
- rm -rf khiops.egg-info
96
+ CONDA_ENVS="py${{ matrix.python-version }} py${{ matrix.python-version }}_conda"
97
+ for CONDA_ENV in $CONDA_ENVS
98
+ do
99
+ $CONDA run --no-capture-output -n "$CONDA_ENV" python setup.py egg_info
100
+ $CONDA install -y -n "$CONDA_ENV" `grep -v "^\[" khiops.egg-info/requires.txt`
101
+ rm -rf khiops.egg-info
102
+ done
96
103
- name : Prepare Unit Tests Environment
97
104
if : github.ref != 'dev' && github.ref != 'main' && ! inputs.run-long-tests
98
105
run : echo "UNITTEST_ONLY_SHORT_TESTS=true" >> "$GITHUB_ENV"
@@ -113,14 +120,16 @@ jobs:
113
120
# This is needed so that the Git tag is parsed and the khiops-python
114
121
# version is retrieved
115
122
git config --global --add safe.directory $(realpath .)
116
- # Native Khiops-based Conda environments
117
- /root/miniconda3/bin/conda run --no-capture-output -n py${{ matrix.python-version }} coverage run -m xmlrunner -o "reports/py${{ matrix.python-version }}" -v
118
- /root/miniconda3/bin/conda run --no-capture-output -n py${{ matrix.python-version }} coverage report -m
119
- /root/miniconda3/bin/conda run --no-capture-output -n py${{ matrix.python-version }} coverage xml -o "reports/py${{ matrix.python-version }}/py-coverage.xml"
120
- # `khiops-core`-based Conda environments
121
- /root/miniconda3/bin/conda run --no-capture-output -n py${{ matrix.python-version }}_conda coverage run -m xmlrunner -o "reports/py${{ matrix.python-version }}_conda" -v
122
- /root/miniconda3/bin/conda run --no-capture-output -n py${{ matrix.python-version }}_conda coverage report -m
123
- /root/miniconda3/bin/conda run --no-capture-output -n py${{ matrix.python-version }}_conda coverage xml -o "reports/py${{ matrix.python-version }}_conda/py-coverage.xml"
123
+ CONDA="/root/miniforge3/bin/conda"
124
+ # Native Khiops-based Conda environment, and
125
+ # `khiops-core`-based Conda environment
126
+ CONDA_ENVS="py${{ matrix.python-version }} py${{ matrix.python-version }}_conda"
127
+ for CONDA_ENV in $CONDA_ENVS
128
+ do
129
+ $CONDA run --no-capture-output -n "$CONDA_ENV" coverage run -m xmlrunner -o "reports/py${{ matrix.python-version }}" -v
130
+ $CONDA run --no-capture-output -n "$CONDA_ENV" coverage report -m
131
+ $CONDA run --no-capture-output -n "$CONDA_ENV" coverage xml -o "reports/$CONDA_ENV/py-coverage.xml"
132
+ done
124
133
- name : Display Unit Test Reports
125
134
uses : dorny/test-reporter@v1
126
135
with :
@@ -217,7 +226,7 @@ jobs:
217
226
# because the `env` context is only accessible at the step level;
218
227
# hence, it is hard-coded
219
228
image : |-
220
- ghcr.io/khiopsml/khiops-python/khiopspydev-${{ matrix.container }}:${{ inputs.image-tag || '10.2.3-b.4.with_native_10 .2.3-b.4' }}
229
+ ghcr.io/khiopsml/khiops-python/khiopspydev-${{ matrix.container }}:${{ inputs.image-tag || '10.2.3-b.4.with_conda-forge_10 .2.3-b.4' }}
221
230
credentials :
222
231
username : ${{ github.actor }}
223
232
password : ${{ secrets.GITHUB_TOKEN }}
0 commit comments