@@ -78,39 +78,27 @@ jobs:
7878 run : |
7979 CONDA="/root/miniforge3/bin/conda"
8080
81- # Native Khiops-based Conda environment, and
82- # `khiops-core`-based Conda environment
83- CONDA_ENVS="py${{ matrix.python-version }} py${{ matrix.python-version }}_conda"
84- for CONDA_ENV in $CONDA_ENVS
85- do
86- mkdir -p -m u+rwx reports/"$CONDA_ENV"
81+ # Native Khiops-based Conda environment (to test in a specific python version)
82+ CONDA_ENV=py${{ matrix.python-version }}
83+ mkdir -p -m u+rwx reports/"$CONDA_ENV"
8784
88- # install within the conda environments without activating them
89- $CONDA install -y -n "$CONDA_ENV" unittest-xml-reporting
90- $CONDA install -y -n "$CONDA_ENV" --file test-requirements.txt
91- done
85+ # install within the conda environments without activating them
86+ $CONDA install -y -n "$CONDA_ENV" unittest-xml-reporting
87+ $CONDA install -y -n "$CONDA_ENV" --file test-requirements.txt
9288 - name : Install khiops-python dependencies
9389 if : success() || failure()
9490 run : |
95- # The following git command is required,
96- # as the Git repository is in a directory the current user does not own,
97- # Python versioneer fails to compute the current version correctly otherwise
98- git config --global --add safe.directory $(realpath .)
9991 CONDA="/root/miniforge3/bin/conda"
100- # Native Khiops-based Conda environment, and
101- # `khiops-core`-based Conda environment
102- CONDA_ENVS="py${{ matrix.python-version }} py${{ matrix.python-version }}_conda"
103- for CONDA_ENV in $CONDA_ENVS
104- do
105- # Since Python 3.13, setuptools is not installed automatically anymore
106- $CONDA install -y -n "$CONDA_ENV" setuptools
92+ # Native Khiops-based Conda environment (to test in a specific python version)
93+ CONDA_ENV=py${{ matrix.python-version }}
94+ # Since Python 3.13, setuptools is not installed automatically anymore
95+ $CONDA install -y -n "$CONDA_ENV" setuptools
10796
108- # Add homogeneous TOML support (Python >= 3.12 has standard tomllib)
109- $CONDA install -y -n "$CONDA_ENV" tomli
110- $CONDA run --no-capture-output -n "$CONDA_ENV" python scripts/extract_dependencies_from_pyproject_toml.py -f "pyproject.toml" > requires.txt
111- $CONDA install -y -n "$CONDA_ENV" `cat requires.txt`
112- rm -f requires.txt
113- done
97+ # Add homogeneous TOML support (Python >= 3.12 has standard tomllib)
98+ $CONDA install -y -n "$CONDA_ENV" tomli
99+ $CONDA run --no-capture-output -n "$CONDA_ENV" python scripts/extract_dependencies_from_pyproject_toml.py -f "pyproject.toml" > requires.txt
100+ $CONDA install -y -n "$CONDA_ENV" `cat requires.txt`
101+ rm -f requires.txt
114102 - name : Configure Expensive Tests Setting
115103 # Skip expensive tests by default, unless on the `main-v10` or `main` branches
116104 if : github.ref != 'main-v10' && github.ref != 'main' && ! inputs.run-expensive-tests
@@ -197,23 +185,17 @@ jobs:
197185 # version is retrieved
198186 git config --global --add safe.directory $(realpath .)
199187 CONDA="/root/miniforge3/bin/conda"
200- # Native Khiops-based Conda environment, and
201- # `khiops-core`-based Conda environment
202- CONDA_ENVS="py${{ matrix.python-version }} py${{ matrix.python-version }}_conda"
203- for CONDA_ENV in $CONDA_ENVS
204- do
205- $CONDA run --no-capture-output -n "$CONDA_ENV" coverage run -m xmlrunner -o "reports/$CONDA_ENV" -v
206- $CONDA run --no-capture-output -n "$CONDA_ENV" coverage report -m
207- $CONDA run --no-capture-output -n "$CONDA_ENV" coverage xml -o "reports/$CONDA_ENV/py-coverage.xml"
208- done
188+ # Native Khiops-based Conda environment (to test in a specific python version)
189+ CONDA_ENV=py${{ matrix.python-version }}
190+ $CONDA run --no-capture-output -n "$CONDA_ENV" coverage run -m xmlrunner -o "reports/$CONDA_ENV" -v
191+ $CONDA run --no-capture-output -n "$CONDA_ENV" coverage report -m
192+ $CONDA run --no-capture-output -n "$CONDA_ENV" coverage xml -o "reports/$CONDA_ENV/py-coverage.xml"
209193 - name : Display Test Reports
210194 if : success() || failure()
211195 uses : dorny/test-reporter@v1
212196 with :
213197 name : Run Tests ${{ matrix.python-version }}
214- path : >-
215- reports/py${{ matrix.python-version }}/TEST-tests.*.*.xml,
216- reports/py${{ matrix.python-version }}_conda/TEST-tests.*.*.xml
198+ path : reports/py${{ matrix.python-version }}/TEST-tests.*.*.xml
217199 reporter : java-junit
218200 path-replace-backslashes : ' true' # Necessary for windows paths
219201 fail-on-error : ' false'
@@ -225,8 +207,6 @@ jobs:
225207 path : |-
226208 reports/py${{ matrix.python-version }}/TEST-tests.*.*.xml
227209 reports/py${{ matrix.python-version }}/py-coverage.xml
228- reports/py${{ matrix.python-version }}_conda/TEST-tests.*.*.xml
229- reports/py${{ matrix.python-version }}_conda/py-coverage.xml
230210 tests/resources/scenario_generation/*/ref/*._kh
231211 tests/resources/scenario_generation/*/output/*._kh
232212 tests/resources/*/output_reports/*.txt
0 commit comments