Skip to content

Commit baa9a41

Browse files
committed
Run a scheduled test on sklearn dev version
1 parent f7a1ae6 commit baa9a41

File tree

3 files changed

+45
-12
lines changed

3 files changed

+45
-12
lines changed

.github/workflows/tests.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
branches: [main]
66
pull_request:
77
# Check all PR
8+
schedule:
9+
# check once a week on mondays
10+
- cron: '0 10 * * 1'
811

912
jobs:
1013
tests:
@@ -22,10 +25,10 @@ jobs:
2225
with:
2326
python-version: ${{ matrix.python-version }}
2427

25-
- name: install tests dependencies
28+
- name: Install tests dependencies
2629
run: python -m pip install tox coverage[toml]
2730

28-
- name: run Python tests
31+
- name: Run Python tests
2932
run: |
3033
tox -e tests
3134
coverage xml
@@ -36,3 +39,24 @@ jobs:
3639
fail_ci_if_error: true
3740
files: ./tests/coverage.xml
3841
token: ${{ secrets.CODECOV_TOKEN }}
42+
43+
tests-dev:
44+
if: github.event_name == 'schedule'
45+
runs-on: ubuntu-latest
46+
strategy:
47+
matrix:
48+
python-version: ["3.10", "3.13"]
49+
50+
steps:
51+
- uses: actions/checkout@v4
52+
53+
- name: Set up Python ${{ matrix.python-version }}
54+
uses: actions/setup-python@v5
55+
with:
56+
python-version: ${{ matrix.python-version }}
57+
58+
- name: Install tests dependencies
59+
run: python -m pip install tox
60+
61+
- name: Run tests against scikit-learn dev version
62+
run: tox -e tests-dev

tests/requirements.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
ase
2+
parameterized
3+
pytest
4+
pytest-cov
5+
tqdm

tox.ini

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,27 @@ commands =
2929
check-manifest {toxinidir}
3030

3131
[testenv:tests]
32-
description = Runs the tests
32+
description = Runs tests
3333
usedevelop = true
34-
changedir = tests
35-
deps =
36-
parameterized
37-
pytest
38-
pytest-cov
39-
tqdm
40-
34+
deps = -r tests/requirements.txt
4135
commands =
4236
# Run unit tests
4337
pytest {posargs}
4438

4539
# Run documentation tests
4640
pytest --doctest-modules --pyargs skmatter {posargs}
4741

42+
[testenv:tests-dev]
43+
description = Runs tests against scikit-learn dev version
44+
deps = -r tests/requirements.txt
45+
commands_pre =
46+
python -m pip install \
47+
--force-reinstall \
48+
--no-deps \
49+
git+https://github.com/scikit-learn/scikit-learn.git
50+
commands =
51+
pytest {posargs}
52+
4853
[testenv:lint]
4954
description = Checks the code and doc for programmatic and stylistic errors
5055
skip_install = true
@@ -74,8 +79,7 @@ commands =
7479
[testenv:docs]
7580
description = Builds the documentation
7681
usedevelop = true
77-
deps =
78-
-r docs/requirements.txt
82+
deps = -r docs/requirements.txt
7983
# The documentation runs "examples" to produce outputs via sphinx-gallery.
8084
extras = examples
8185
commands =

0 commit comments

Comments
 (0)