]> gitweb.fluxo.info Git - keyringer.git/commitdiff
Feat: CI: test job (#10)
authorSilvio Rhatto <rhatto@riseup.net>
Sat, 4 Jan 2025 18:55:16 +0000 (15:55 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sat, 4 Jan 2025 18:55:16 +0000 (15:55 -0300)
.gitlab-ci.yml

index b9e7c9eb778d8f4669ff0870fad81c5133791952..ee65ddbe27eb3dd213fdf2c8a73c68c68c7b54f1 100644 (file)
@@ -52,3 +52,29 @@ debian:
   artifacts:
     paths:
       - dist
+
+test:
+  image: debian:testing
+  script:
+    # Install keyringer from the distro packaging system
+    # This ensures the needed dependencies are installed
+    - apt-get update
+    - apt-get install -y keyringer
+
+    # Import debian/upstream/signing-key.asc
+    - git fetch --all
+    - git branch debian --track origin/debian || true
+    - git checkout debian
+    - gpg --import < debian/upstream/signing-key.asc
+
+    # Test in the develop branch
+    - git branch develop --track origin/develop || true
+    - git checkout develop
+    - mkdir ~/temp/tests/keyringer
+    - ./keyringer test init ~/temp/tests/keyringer
+    - gpg --with-colons --list-keys | grep uid | awk -F ':' '{ x = $10; gsub(/.*</, "", x); gsub(/>/, "", x); print x, $8; }' >> ~/temp/tests/keyringer/config/recipients/default
+    - ./keyringer test check
+    - ./keyringer test teardown -y
+
+    # Test in the main branch
+    # ...