@@ -78,17 +78,14 @@ jobs:
7878 run : |
7979 CONDA="/root/miniforge3/bin/conda"
8080
81- # Native Khiops-based Conda environment, and
81+ # Native Khiops-based Conda environment (to test in a specific python version)
8282 # `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"
83+ CONDA_ENV=py${{ matrix.python-version }}
84+ mkdir -p -m u+rwx reports/"$CONDA_ENV"
8785
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
86+ # install within the conda environments without activating them
87+ $CONDA install -y -n "$CONDA_ENV" unittest-xml-reporting
88+ $CONDA install -y -n "$CONDA_ENV" --file test-requirements.txt
9289 - name : Install khiops-python dependencies
9390 if : success() || failure()
9491 run : |
@@ -97,20 +94,16 @@ jobs:
9794 # Python versioneer fails to compute the current version correctly otherwise
9895 git config --global --add safe.directory $(realpath .)
9996 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
97+ # Native Khiops-based Conda environment (to test in a specific python version)
98+ CONDA_ENV=py${{ matrix.python-version }}
99+ # Since Python 3.13, setuptools is not installed automatically anymore
100+ $CONDA install -y -n "$CONDA_ENV" setuptools
107101
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
102+ # Add homogeneous TOML support (Python >= 3.12 has standard tomllib)
103+ $CONDA install -y -n "$CONDA_ENV" tomli
104+ $CONDA run --no-capture-output -n "$CONDA_ENV" python scripts/extract_dependencies_from_pyproject_toml.py -f "pyproject.toml" > requires.txt
105+ $CONDA install -y -n "$CONDA_ENV" `cat requires.txt`
106+ rm -f requires.txt
114107 - name : Configure Expensive Tests Setting
115108 # Skip expensive tests by default, unless on the `main-v10` or `main` branches
116109 if : github.ref != 'main-v10' && github.ref != 'main' && ! inputs.run-expensive-tests
@@ -197,23 +190,18 @@ jobs:
197190 # version is retrieved
198191 git config --global --add safe.directory $(realpath .)
199192 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
193+ # Native Khiops-based Conda environment (to test in a specific python version)
194+ CONDA_ENV=py${{ matrix.python-version }}
195+ $CONDA run --no-capture-output -n "$CONDA_ENV" coverage run -m xmlrunner -o "reports/$CONDA_ENV" -v
196+ $CONDA run --no-capture-output -n "$CONDA_ENV" coverage report -m
197+ $CONDA run --no-capture-output -n "$CONDA_ENV" coverage xml -o "reports/$CONDA_ENV/py-coverage.xml"
209198 - name : Display Test Reports
210199 if : success() || failure()
211200 uses : dorny/test-reporter@v1
212201 with :
213202 name : Run Tests ${{ matrix.python-version }}
214203 path : >-
215- reports/py${{ matrix.python-version }}/TEST-tests.*.*.xml,
216- reports/py${{ matrix.python-version }}_conda/TEST-tests.*.*.xml
204+ reports/py${{ matrix.python-version }}/TEST-tests.*.*.xml
217205 reporter : java-junit
218206 path-replace-backslashes : ' true' # Necessary for windows paths
219207 fail-on-error : ' false'
@@ -225,8 +213,6 @@ jobs:
225213 path : |-
226214 reports/py${{ matrix.python-version }}/TEST-tests.*.*.xml
227215 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
230216 tests/resources/scenario_generation/*/ref/*._kh
231217 tests/resources/scenario_generation/*/output/*._kh
232218 tests/resources/*/output_reports/*.txt
0 commit comments