Skip to content
Snippets Groups Projects
Commit 7033baf8 authored by Frederik Hennig's avatar Frederik Hennig
Browse files

Adapt noxfile and CI

 - Pull pystencils before every testsuite run
 - Permit all Python versions since 3.10
 - Add python 3.13 testsuite run to CI
parent 0890d5be
No related branches found
No related tags found
1 merge request!15Use config descriptor system from pystencils
Pipeline #73071 passed
...@@ -23,12 +23,10 @@ typechecker: ...@@ -23,12 +23,10 @@ typechecker:
script: script:
- nox --session typecheck - nox --session typecheck
testsuite: .testsuite-base:
extends: .nox-base extends: .nox-base
stage: "Tests" stage: "Tests"
needs: [] needs: []
script:
- nox --session testsuite
coverage: '/TOTAL.*\s+(\d+%)$/' coverage: '/TOTAL.*\s+(\d+%)$/'
artifacts: artifacts:
when: always when: always
...@@ -40,6 +38,16 @@ testsuite: ...@@ -40,6 +38,16 @@ testsuite:
coverage_format: cobertura coverage_format: cobertura
path: coverage.xml path: coverage.xml
"testsuite-py3.10":
extends: .testsuite-base
script:
- nox --session testsuite-3.10
"testsuite-py3.13":
extends: .testsuite-base
script:
- nox --session testsuite-3.13
build-documentation: build-documentation:
extends: .nox-base extends: .nox-base
stage: "Documentation" stage: "Documentation"
......
...@@ -11,7 +11,14 @@ def add_pystencils_git(session: nox.Session): ...@@ -11,7 +11,14 @@ def add_pystencils_git(session: nox.Session):
cache_dir = session.cache_dir cache_dir = session.cache_dir
pystencils_dir = cache_dir / "pystencils" pystencils_dir = cache_dir / "pystencils"
if not pystencils_dir.exists(): if pystencils_dir.exists():
with session.chdir(pystencils_dir):
session.run_install(
"git",
"pull",
external=True
)
else:
session.run_install( session.run_install(
"git", "git",
"clone", "clone",
...@@ -50,7 +57,7 @@ def typecheck(session: nox.Session): ...@@ -50,7 +57,7 @@ def typecheck(session: nox.Session):
session.run("mypy", "src/pystencilssfg") session.run("mypy", "src/pystencilssfg")
@nox.session(python=["3.10"], tags=["tests"]) @nox.session(python=["3.10", "3.11", "3.12", "3.13"], tags=["tests"])
def testsuite(session: nox.Session): def testsuite(session: nox.Session):
"""Run the testsuite and measure coverage.""" """Run the testsuite and measure coverage."""
editable_install(session, ["testsuite"]) editable_install(session, ["testsuite"])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment