]> Frank Brehm's Git Trees - pixelpark/python-packaging.git/commitdiff
Adding first ci-yaml-files
authorFrank Brehm <frank@brehm-online.com>
Wed, 28 Dec 2022 15:11:59 +0000 (16:11 +0100)
committerFrank Brehm <frank@brehm-online.com>
Wed, 28 Dec 2022 15:11:59 +0000 (16:11 +0100)
gitlab/create-all.yaml [new file with mode: 0644]
gitlab/python-setup-template.yaml [new file with mode: 0644]
gitlab/python-test-template.yaml [new file with mode: 0644]
gitlab/python-tests.yaml [new file with mode: 0644]

diff --git a/gitlab/create-all.yaml b/gitlab/create-all.yaml
new file mode 100644 (file)
index 0000000..16c2d7f
--- /dev/null
@@ -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 (file)
index 0000000..44a4f53
--- /dev/null
@@ -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 (file)
index 0000000..fab7b16
--- /dev/null
@@ -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 (file)
index 0000000..cd3cf39
--- /dev/null
@@ -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