Skip to content

Commit 75a579b

Browse files
authored
[ENH] minor improvements to CI (#144)
Makes minor improvements to the CI: * single install command for the `sklearn` job, to avoid dependency resolution issues - two-step installs can lead to dependency conflicts and cause uninstall and reinstall of packages installed in step one * add step in all jobs to show installed packages and versions after installation, this is a useful diagnostic * replace empty space by dash in name of `sklearn` job * fix typos
1 parent 9479b2d commit 75a579b

1 file changed

Lines changed: 13 additions & 6 deletions

File tree

.github/workflows/test.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ jobs:
4242
4343
make install-no-extras-for-test
4444
45+
- name: Show dependencies
46+
run: python -m pip list
47+
4548
- name: Test with pytest
4649
run: |
4750
python -m pytest tests -p no:warnings
@@ -77,6 +80,9 @@ jobs:
7780
7881
make install-all-extras-for-test
7982
83+
- name: Show dependencies
84+
run: python -m pip list
85+
8086
- name: Test with pytest
8187
run: |
8288
python -m pytest tests --cov=hyperactive --cov-report=term-missing --cov-report=xml -p no:warnings
@@ -86,7 +92,7 @@ jobs:
8692
python -m pytest src/hyperactive -p no:warnings
8793
8894
test-sklearn-versions:
89-
name: test-sklearn-${{ matrix.sklearn-version }} python-${{ matrix.python-version }}
95+
name: test-sklearn-${{ matrix.sklearn-version }}-python-${{ matrix.python-version }}
9096
runs-on: ubuntu-latest
9197

9298
strategy:
@@ -98,18 +104,19 @@ jobs:
98104
steps:
99105
- uses: actions/checkout@v4
100106

101-
- name: Set up Python 3.12
107+
- name: Set up Python ${{ matrix.python-version }}
102108
uses: actions/setup-python@v5
103109
with:
104110
python-version: ${{ matrix.python-version }}
105111

106112
- name: Install dependencies for scikit-learn ${{ matrix.sklearn-version }}
107113
run: |
108114
python -m pip install --upgrade pip
109-
python -m pip install build pytest
110-
make install
111-
python -m pip install scikit-learn==${{ matrix.sklearn-version }}
115+
python -m pip install .[all_extras,test] scikit-learn==${{ matrix.sklearn-version }}
116+
117+
- name: Show dependencies
118+
run: python -m pip list
112119

113120
- name: Run sklearn integration tests for ${{ matrix.sklearn-version }}
114121
run: |
115-
python -m pytest -x -p no:warnings tests/integrations/sklearn/
122+
python -m pytest -x -p no:warnings tests/integrations/sklearn/

0 commit comments

Comments
 (0)