From: Frank Brehm Date: Wed, 28 Dec 2022 15:11:59 +0000 (+0100) Subject: Adding first ci-yaml-files X-Git-Tag: v1.0~38 X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=0fd9d1c52607e16700b83c606aa504f0ff8f4f73;p=pixelpark%2Fpython-packaging.git Adding first ci-yaml-files --- diff --git a/gitlab/create-all.yaml b/gitlab/create-all.yaml new file mode 100644 index 0000000..16c2d7f --- /dev/null +++ b/gitlab/create-all.yaml @@ -0,0 +1,33 @@ +--- + +stages: + - test + - linter + - build + - sign + - deploy + +variables: + DEBFULLNAME: 'Frank Brehm' + DEBEMAIL: 'frank@brehm-online.com' + EXPIRE_ARTIFACTS_IN: '1 week' + FB_REPOSERVER_URL: 'http://repo.uhu-banane.de' + FB_REPOSERVER_GPGKEY_URL: 'http://repo.uhu-banane.de/public/repo.uhu-banane.de.gpg-key2.asc' + NOTIFY_ADDRESS: 'frank.brehm@pixelpark.com' + SENDER_ADDRESS: 'gitlab-ci@pixelpark.com' + SSH_PRIV_KEY_YUM_REPO: 'nada' + USED_TIMEZONE: 'Europe/Berlin' + VERSION_PREFIX: 'unknown' + YUM_REPO_GPG_ID: 'C0E73F70' + YUM_REPO_GPG_PASSWD: '' + YUM_REPO_HOST: 'repo02.pixelpark.com' + YUM_REPO_USER: 'rpm-repo' + YUM_REPO_DIR_HTTP: '/Linux/yum/pixelpark' + YUM_REPO_DIR: "/srv/www/repo${YUM_REPO_DIR_HTTP}" + YUM_REPO_GPG_KEY_PUB: 'nada' + YUM_REPO_GPG_KEY_SEC: '' + +include: + - local: /gitlab/python-tests.yaml + +# vim: et tabstop=2 expandtab shiftwidth=2 softtabstop=2 list diff --git a/gitlab/python-setup-template.yaml b/gitlab/python-setup-template.yaml new file mode 100644 index 0000000..44a4f53 --- /dev/null +++ b/gitlab/python-setup-template.yaml @@ -0,0 +1,30 @@ +--- + +.setup-python-environment: + before_script: + - locale -a + - apt update && apt install --yes sudo locales gettext + - > + if test -f /etc/locale.gen; then + echo "/etc/locale.gen:" + grep -P -v '^\s*(#.*)?$' /etc/locale.gen || true + echo "<-- EOF" + fi + - > + if grep 'en_US.UTF-8' /etc/locale.gen; then + sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen + else + echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen + fi + - > + if grep 'de_DE.UTF-8' /etc/locale.gen; then + sed -i -e 's/# de_DE.UTF-8 UTF-8/de_DE.UTF-8 UTF-8/' /etc/locale.gen + else + echo 'de_DE.UTF-8 UTF-8' >> /etc/locale.gen + fi + - locale-gen + - locale -a + - pip install --upgrade pip + - pip install -r requirements.txt --upgrade --upgrade-strategy eager + +# vim: et tabstop=2 expandtab shiftwidth=2 softtabstop=2 list diff --git a/gitlab/python-test-template.yaml b/gitlab/python-test-template.yaml new file mode 100644 index 0000000..fab7b16 --- /dev/null +++ b/gitlab/python-test-template.yaml @@ -0,0 +1,20 @@ +--- + +.exec-python-tests: + stage: test + rules: + - if: '$CI_COMMIT_TAG' + - if: $CI_COMMIT_BRANCH == "master" + - if: $CI_COMMIT_BRANCH == "main" + - if: $CI_COMMIT_BRANCH == "test" + - if: $CI_COMMIT_BRANCH =~ /test-.*/ + - if: $CI_COMMIT_BRANCH =~ /build.*/ + - if: $CI_COMMIT_BRANCH == "develop" + tags: + - docker + script: + - pip install --upgrade --upgrade-strategy eager pytest + - pip list --format columns + - pytest --verbose + +# vim: et tabstop=2 expandtab shiftwidth=2 softtabstop=2 list diff --git a/gitlab/python-tests.yaml b/gitlab/python-tests.yaml new file mode 100644 index 0000000..cd3cf39 --- /dev/null +++ b/gitlab/python-tests.yaml @@ -0,0 +1,49 @@ +--- + +include: + - local: /gitlab/python-setup-template.yaml + - local: /gitlab/python-test-template.yaml + +# --------------------------- +test Python 3.6: + extends: + - .setup-python-environment + - .exec-python-tests + image: python:3.6 + +# --------------------------- +test Python 3.7: + extends: + - .setup-python-environment + - .exec-python-tests + image: python:3.7 + +# --------------------------- +test Python 3.8: + extends: + - .setup-python-environment + - .exec-python-tests + image: python:3.8 + +# --------------------------- +test Python 3.9: + extends: + - .setup-python-environment + - .exec-python-tests + image: python:3.9 + +# --------------------------- +test Python 3.10: + extends: + - .setup-python-environment + - .exec-python-tests + image: python:3.10 + +# --------------------------- +test Python 3.11: + extends: + - .setup-python-environment + - .exec-python-tests + image: python:3.11 + +# vim: et tabstop=2 expandtab shiftwidth=2 softtabstop=2 list