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

reintroduce tests-and-coverage task

parent bab7116a
No related branches found
No related tags found
Loading
Pipeline #67869 failed
...@@ -8,42 +8,6 @@ stages: ...@@ -8,42 +8,6 @@ stages:
# -------------------------- Legacy Tests ------------------------------------------------------------------------------------ # -------------------------- Legacy Tests ------------------------------------------------------------------------------------
# Normal test - runs on every commit all but "long run" tests
tests-and-coverage:
stage: legacy_test
allow_failure: true
when: manual
except:
variables:
- $ENABLE_NIGHTLY_BUILDS
image: i10git.cs.fau.de:5005/pycodegen/pycodegen/full
before_script:
- pip install -e .
script:
- env
- pip list
- export NUM_CORES=$(nproc --all)
- mkdir -p ~/.config/matplotlib
- echo "backend:template" > ~/.config/matplotlib/matplotlibrc
- mkdir public
- pytest -v -n $NUM_CORES --cov-report html --cov-report xml --cov-report term --cov=. -m "not longrun" --html test-report/index.html --junitxml=report.xml
- python -m coverage xml
tags:
- docker
- cuda11
- AVX
coverage: /Total coverage:\s\d+.\d+\%/
artifacts:
when: always
paths:
- coverage_report
- test-report
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml
junit: report.xml
# Normal test with longruns # Normal test with longruns
tests-and-coverage-with-longrun: tests-and-coverage-with-longrun:
stage: legacy_test stage: legacy_test
...@@ -316,33 +280,39 @@ mypy-typecheck: ...@@ -316,33 +280,39 @@ mypy-typecheck:
tags: tags:
- docker - docker
# -------------------- Code Quality --------------------------------------------------------------------- # -------------------- Unit Tests ---------------------------------------------------------------------
nbackend-unit-tests: # Normal test - runs on every commit all but "long run" tests
tests-and-coverage:
stage: "Unit Tests" stage: "Unit Tests"
needs: [] needs: []
image: i10git.cs.fau.de:5005/pycodegen/pycodegen/full image: i10git.cs.fau.de:5005/pycodegen/pycodegen/full
before_script: before_script:
- pip install -e .[tests] - pip install -e .[tests]
script: script:
- pytest tests/nbackend tests/symbolics - env
- pip list
- export NUM_CORES=$(nproc --all)
- mkdir -p ~/.config/matplotlib
- echo "backend:template" > ~/.config/matplotlib/matplotlibrc
- mkdir public
- pytest -v -n $NUM_CORES --cov-report html --cov-report xml --cov-report term --cov=. -m "not longrun" --html test-report/index.html --junitxml=report.xml
- python -m coverage xml
tags: tags:
- docker - docker
- cuda11 - cuda11
- AVX
doctest: coverage: /Total coverage:\s\d+.\d+\%/
stage: "Unit Tests" artifacts:
needs: [] when: always
image: i10git.cs.fau.de:5005/pycodegen/pycodegen/full paths:
before_script: - coverage_report
- pip install -e .[tests] - test-report
script: reports:
- pytest src/pystencils/backend coverage_report:
- pytest src/pystencils/types coverage_format: cobertura
tags: path: coverage.xml
- docker junit: report.xml
# -------------------- Documentation --------------------------------------------------------------------- # -------------------- Documentation ---------------------------------------------------------------------
...@@ -366,7 +336,7 @@ build-documentation: ...@@ -366,7 +336,7 @@ build-documentation:
pages: pages:
image: i10git.cs.fau.de:5005/pycodegen/pycodegen/full image: i10git.cs.fau.de:5005/pycodegen/pycodegen/full
stage: deploy stage: deploy
needs: ["build-documentation"] needs: ["tests-and-coverage", "build-documentation"]
script: script:
- mv docs/build/html public - mv docs/build/html public
- mv coverage_report public/coverage_report - mv coverage_report public/coverage_report
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment