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 -r requirements.txt
# ===========================================================
# ===========================================================
# check if everything is properly formatted
black:
image:
name: fsfe/reuse:latest
entrypoint: [""]
before_script:
- echo "Override default 'before_script'..."
# ===========================================================
# Testing stage
# ===========================================================
# 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:
coverage_report:
coverage_format: cobertura
path: coverage.xml
# test saqc with python 3.7
python37:
stage: test
image: python:3.7
script:
- pytest tests dios/test -Werror --junitxml=report.xml
- python -m saqc --config docs/resources/data/config.csv --data docs/resources/data/data.csv --outfile /tmp/test.csv
artifacts:
when: always
reports:
junit: report.xml
- pytest tests dios/test -Werror --junitxml=report.xml
- python -m saqc --config docs/resources/data/config.csv --data docs/resources/data/data.csv --outfile /tmp/test.csv
artifacts:
when: always
reports:
junit: report.xml
script:
- pytest tests dios/test -Werror --junitxml=report.xml
- python -m saqc --config docs/resources/data/config.csv --data docs/resources/data/data.csv --outfile /tmp/test.csv
artifacts:
when: always
reports:
junit: report.xml
script:
- pytest tests dios/test -Werror --junitxml=report.xml
- python -m saqc --config docs/resources/data/config.csv --data docs/resources/data/data.csv --outfile /tmp/test.csv
artifacts:
when: always
reports:
junit: report.xml
doctest:
stage: test
script:
- cd docs
- pip install -r requirements.txt
- make doc # needed for _api tests
# ===========================================================
# Building stage
# ===========================================================
- pip install .
docs:
stage: build
script:
- cd docs
- pip install -r requirements.txt
# ===========================================================
# Extra Pipeline (run with a successful run of all other jobs on develop)
# ===========================================================
- develop
except:
- schedules