Newer
Older
# SPDX-FileCopyrightText: 2021 Helmholtz-Zentrum für Umweltforschung GmbH - UFZ
#
# SPDX-License-Identifier: GPL-3.0-or-later
# ===========================================================
# preparation
# ===========================================================
variables:
GIT_SUBMODULE_STRATEGY: recursive
before_script:
- pip install --upgrade pip
- pip install pytest
- pip install -r requirements.txt
# ===========================================================
# ===========================================================
# check if everything is properly formatted
black:
# Check compliance with the REUSE specification
reuse_compliance:
image:
name: fsfe/reuse:latest
entrypoint: [""]
before_script:
- echo "Override default 'before_script'..."
# make (visual) coverage in gitlab merge request diff's
coverage:
stage: test
allow_failure: true
- pytest --cov=saqc tests --ignore=tests/fuzzy -Werror
after_script:
- coverage xml
# regex to find the coverage percentage in the job output
coverage: '/^TOTAL.+?(\d+\%)$/'
artifacts:
when: always
reports:
cobertura: coverage.xml
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
- pytest tests dios/test -Werror --junitxml=report.xml
- python -m saqc --config sphinxdoc/resources/data/config.csv --data sphinxdoc/resources/data/data.csv --outfile /tmp/test.csv
artifacts:
when: always
reports:
junit: report.xml
# test saqc with python 3.8
python38:
stage: test
script:
- pytest tests dios/test -Werror --junitxml=report.xml
- python -m saqc --config sphinxdoc/resources/data/config.csv --data sphinxdoc/resources/data/data.csv --outfile /tmp/test.csv
artifacts:
when: always
reports:
junit: report.xml
# test saqc with python 3.9
python39:
stage: test
image: python:3.9
script:
- pytest tests dios/test -Werror --junitxml=report.xml
- python -m saqc --config sphinxdoc/resources/data/config.csv --data sphinxdoc/resources/data/data.csv --outfile /tmp/test.csv
artifacts:
when: always
reports:
junit: report.xml
# ===========================================================
# Extra Pipeline (run with a successful run of all other jobs on develop)
# ===========================================================
- develop
except:
- schedules
- cd sphinxdoc/