-
Peter Lünenschloß authoredd7bfe657
.gitlab-ci.yml 5.62 KiB
# SPDX-FileCopyrightText: 2021 Helmholtz-Zentrum für Umweltforschung GmbH - UFZ
#
# SPDX-License-Identifier: GPL-3.0-or-later
# ===========================================================
# Hints
# ===========================================================
# $PYPI_PKG_NAME
# The variable PYPI_PKG_NAME is used in setup.py to determine
# how to name the tarball package. If not set the package is
# named 'saqc'.
# $TESTPYPI_TOKEN
# The upload token used for testpypi, set it on the gitlab
# page and enable masking to prevent revealing
# ===========================================================
# preparation
# ===========================================================
variables:
GIT_SUBMODULE_STRATEGY: recursive
stages:
- compliance
- test
- build
- deploy
default:
image: python:3.11
before_script:
- pip install --upgrade pip
- pip install -r requirements.txt
- pip install -r tests/requirements.txt
- apt update
- apt install -y xvfb
# ===========================================================
# Compliance stage
# ===========================================================
# check if everything is properly formatted
black:
stage: compliance
script:
- pip install black
- black --check .
# check if imports are sorted
isort:
stage: compliance
script:
- pip install isort
- isort --check .
# Check compliance with the REUSE specification
reuse:
stage: compliance
image:
name: fsfe/reuse:latest
entrypoint: [""]
before_script:
- echo "Override default 'before_script'..."
script:
- reuse lint