Skip to content

Commit 5b65e19

Browse files
authored
Run a scheduled test on scikit-learn dev version (#261)
* Run a scheduled test on sklearn dev version * Set coverage limit to 90%
1 parent 004287c commit 5b65e19

File tree

5 files changed

+50
-14
lines changed

5 files changed

+50
-14
lines changed

.codecov.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ coverage:
44
status:
55
project:
66
default:
7-
target: 95%
7+
target: 90%
88
patch:
99
default:
10-
target: 95%
10+
target: 90%
1111

1212
comment: false

.github/workflows/tests-dev.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Tests dev
2+
3+
on:
4+
schedule:
5+
# check once a week on mondays
6+
- cron: '0 10 * * 1'
7+
8+
jobs:
9+
tests-dev:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
python-version: ["3.10", "3.13"]
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
23+
- name: Install tests dependencies
24+
run: python -m pip install tox
25+
26+
- name: Run tests against scikit-learn dev version
27+
run: tox -e tests-dev

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ jobs:
2222
with:
2323
python-version: ${{ matrix.python-version }}
2424

25-
- name: install tests dependencies
25+
- name: Install tests dependencies
2626
run: python -m pip install tox coverage[toml]
2727

28-
- name: run Python tests
28+
- name: Run Python tests
2929
run: |
3030
tox -e tests
3131
coverage xml

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)