From 1f96a84f9ad2bf8ef4ecb1f44c876c6ed9495407 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 24 Feb 2025 13:05:37 +0100 Subject: [PATCH] gitlab-ci: add yamllint job --- .gitlab-ci.yml | 29 +++++++++++++++++++ .../info.guardianproject.urzip/.fdroid.yml | 1 - tests/metadata/duplicate.permisssions.yml | 2 +- tests/metadata/info.guardianproject.urzip.yml | 8 ++--- .../metadata/info.zwanenburg.caffeinetile.yml | 2 +- tests/metadata/org.videolan.vlc.yml | 6 ++-- 6 files changed, 38 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 69b10ae6..6ebc12da 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -274,6 +274,35 @@ safety: - python3 -m safety --key "$SAFETY_API_KEY" --stage cicd scan +# TODO tests/*/*/*.yaml are not covered +yamllint: + image: debian:bookworm-slim + rules: + # once only:/changes: are ported to rules:, this could be removed: + - if: $CI_PIPELINE_SOURCE == "merge_request_event" + when: never + - if: $CI_PIPELINE_SOURCE == "push" + changes: + - .gitlab-ci.yml + - .safety-policy.yml + - .yamllint + - tests/*.yml + - tests/*/*.yml + - tests/*/*/.*.yml + <<: *apt-template + variables: + LANG: C.UTF-8 + script: + - apt-get install yamllint + - yamllint + .gitlab-ci.yml + .safety-policy.yml + .yamllint + tests/*.yml + tests/*/*.yml + tests/*/*/.*.yml + + # Run all the various linters and static analysis tools. locales: image: debian:bookworm-slim diff --git a/tests/build/info.guardianproject.urzip/.fdroid.yml b/tests/build/info.guardianproject.urzip/.fdroid.yml index 7f2b3c1c..beea89be 100644 --- a/tests/build/info.guardianproject.urzip/.fdroid.yml +++ b/tests/build/info.guardianproject.urzip/.fdroid.yml @@ -1,4 +1,3 @@ - Summary: This should be overridden by metadata/info.guardianproject.urzip.yml Builds: - versionCode: 50 diff --git a/tests/metadata/duplicate.permisssions.yml b/tests/metadata/duplicate.permisssions.yml index 3401c235..1b721fdb 100644 --- a/tests/metadata/duplicate.permisssions.yml +++ b/tests/metadata/duplicate.permisssions.yml @@ -1,4 +1,4 @@ Categories: -- tests + - tests Name: Duplicate Permisssions Summary: 'Test app for all possible ' diff --git a/tests/metadata/info.guardianproject.urzip.yml b/tests/metadata/info.guardianproject.urzip.yml index d35f7887..cf783f89 100644 --- a/tests/metadata/info.guardianproject.urzip.yml +++ b/tests/metadata/info.guardianproject.urzip.yml @@ -3,10 +3,10 @@ AutoUpdateMode: None Bitcoin: 1Fi5xUHiAPRKxHvyUGVFGt9extBe8Srdbk OpenCollective: f-droid-just-testing Categories: -- Development -- GuardianProject -- 1 -- 2.0 + - Development + - GuardianProject + - 1 + - 2.0 CurrentVersionCode: 2147483647 AuthorWebSite: https://guardianproject.info Description: | diff --git a/tests/metadata/info.zwanenburg.caffeinetile.yml b/tests/metadata/info.zwanenburg.caffeinetile.yml index a1c0b284..50321a81 100644 --- a/tests/metadata/info.zwanenburg.caffeinetile.yml +++ b/tests/metadata/info.zwanenburg.caffeinetile.yml @@ -1,4 +1,4 @@ Categories: -- Development + - Development Name: Caffeine Tile Summary: Test app for extracting icons when an XML one is default diff --git a/tests/metadata/org.videolan.vlc.yml b/tests/metadata/org.videolan.vlc.yml index 266f517d..3d40e9e9 100644 --- a/tests/metadata/org.videolan.vlc.yml +++ b/tests/metadata/org.videolan.vlc.yml @@ -317,7 +317,7 @@ Builds: prebuild: sed -i '/ant/d' ../Makefile && ln -s vlc-android/$$VLC-2.2$$ ../vlc build: cd ../ && ANDROID_ABI=armeabi-v7a ./compile.sh release -#0.9.10 vercodes were off + # 0.9.10 vercodes were off - versionName: 1.0.0 versionCode: 10006 disable: doesn't build @@ -328,7 +328,7 @@ Builds: prebuild: sed -i '/ant/d' ../Makefile && ln -s vlc-android/$$VLC-2.2$$ ../vlc build: cd ../ && ANDROID_ABI=x86 ./compile.sh release -#0.9.10 vercodes were off + # 0.9.10 vercodes were off - versionName: 1.0.0 versionCode: 10007 disable: doesn't build @@ -339,7 +339,7 @@ Builds: prebuild: sed -i '/ant/d' ../Makefile && ln -s vlc-android/$$VLC-2.2$$ ../vlc build: cd ../ && ANDROID_ABI=armeabi ./compile.sh release -#0.9.10 vercodes were off + # 0.9.10 vercodes were off - versionName: 1.0.0 versionCode: 10008 disable: doesn't build