OpenMiInk/third_party/ci-notary-service/.gitlab-ci.yml
Hellings b8c8ff98e2 Hi
2026-10-16 09:05:56 -04:00

70 lines
1.4 KiB
YAML

# SPDX-License-Identifier: BSD-2-Clause
# SPDX-FileCopyrightText: 2023 KDE e.V.
# SPDX-FileContributor: Ingo Klöcker <dev@ingo-kloecker.de>
include:
- project: sysadmin/ci-utilities
file: /gitlab-templates/reuse-lint.yml
workflow:
rules:
# Prevent branch pipelines if an MR is open on the branch.
- if: $CI_COMMIT_BRANCH && $CI_PIPELINE_SOURCE == "push" && $CI_OPEN_MERGE_REQUESTS
when: never
# Allow merge request pipelines.
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
# Build tags and branches too
- if: $CI_COMMIT_TAG
- if: $CI_COMMIT_BRANCH
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
default:
image: python:3.11
tags:
- Linux
interruptible: true
before_script:
- python --version
- python -m venv .venv
- source .venv/bin/activate
- pip install tox
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml
junit: junit-*.xml
py310:
image: python:3.10
script: tox -e py310
py311-coverage:
script: tox -e coverage
coverage: "/[^ ]+%/"
format:
script: tox -e check-format
lint:
script: tox -e lint
imports:
script: tox -e check-imports
security:
script: tox -e security
type-check:
script: tox -e static-type-checker
reuse:
inherit:
default: false
# override the stage of the reuse-lint template
stage: test
yamllint:
script: tox -e yamllint