]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
.github/workflows,script: add test for missing .qa links 62439/head
authorPatrick Donnelly <pdonnell@ibm.com>
Fri, 21 Mar 2025 17:12:01 +0000 (13:12 -0400)
committerPatrick Donnelly <pdonnell@ibm.com>
Fri, 21 Mar 2025 17:22:20 +0000 (13:22 -0400)
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
.github/workflows/qa-symlink.yml [new file with mode: 0644]
src/script/verify-qa [new file with mode: 0755]

diff --git a/.github/workflows/qa-symlink.yml b/.github/workflows/qa-symlink.yml
new file mode 100644 (file)
index 0000000..96d8fb9
--- /dev/null
@@ -0,0 +1,17 @@
+---
+name: "Check for missing .qa links"
+on: [pull_request]
+
+jobs:
+  pull_request:
+    name: "Check for missing .qa links"
+    runs-on: ubuntu-latest
+    steps:
+      - name: checkout ceph.git
+        uses: actions/checkout@v4
+        with:
+          path: ceph
+
+      - name: verify .qa links
+        run: ./src/script/verify-qa
+        working-directory: ceph
diff --git a/src/script/verify-qa b/src/script/verify-qa
new file mode 100755 (executable)
index 0000000..6b011a5
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+find qa/suites/ -type d -execdir ln -sfT ../.qa/ {}/.qa \;
+
+git add '*.qa'
+
+DIFF=$(git diff --cached)
+
+if [ -z "$DIFF" ]; then
+  printf 'passed\n'
+  exit 0
+else
+  printf 'Please apply the following patch:\n\n%s\n' "$DIFF"
+  exit 1
+fi