diff --git a/.codecov.yml b/.codecov.yml index 98acab721..e8dd587ca 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -4,9 +4,9 @@ coverage: status: project: default: - target: 95% + target: 90% patch: default: - target: 95% + target: 90% comment: false diff --git a/.github/workflows/tests-dev.yml b/.github/workflows/tests-dev.yml new file mode 100644 index 000000000..be5f5f62f --- /dev/null +++ b/.github/workflows/tests-dev.yml @@ -0,0 +1,27 @@ +name: Tests dev + +on: + schedule: + # check once a week on mondays + - cron: '0 10 * * 1' + +jobs: + tests-dev: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.10", "3.13"] + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install tests dependencies + run: python -m pip install tox + + - name: Run tests against scikit-learn dev version + run: tox -e tests-dev diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2d5462eb7..da175cea6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,10 +22,10 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: install tests dependencies + - name: Install tests dependencies run: python -m pip install tox coverage[toml] - - name: run Python tests + - name: Run Python tests run: | tox -e tests coverage xml diff --git a/tests/requirements.txt b/tests/requirements.txt new file mode 100644 index 000000000..75d15671e --- /dev/null +++ b/tests/requirements.txt @@ -0,0 +1,5 @@ +ase +parameterized +pytest +pytest-cov +tqdm diff --git a/tox.ini b/tox.ini index 35cb69eff..ce4bd0f4d 100644 --- a/tox.ini +++ b/tox.ini @@ -29,15 +29,9 @@ commands = check-manifest {toxinidir} [testenv:tests] -description = Runs the tests +description = Runs tests usedevelop = true -changedir = tests -deps = - parameterized - pytest - pytest-cov - tqdm - +deps = -r tests/requirements.txt commands = # Run unit tests pytest {posargs} @@ -45,6 +39,17 @@ commands = # Run documentation tests pytest --doctest-modules --pyargs skmatter {posargs} +[testenv:tests-dev] +description = Runs tests against scikit-learn dev version +deps = -r tests/requirements.txt +commands_pre = + python -m pip install \ + --force-reinstall \ + --no-deps \ + git+https://github.com/scikit-learn/scikit-learn.git +commands = + pytest {posargs} + [testenv:lint] description = Checks the code and doc for programmatic and stylistic errors skip_install = true @@ -74,8 +79,7 @@ commands = [testenv:docs] description = Builds the documentation usedevelop = true -deps = - -r docs/requirements.txt +deps = -r docs/requirements.txt # The documentation runs "examples" to produce outputs via sphinx-gallery. extras = examples commands =