From: Patrick Donnelly Date: Fri, 21 Mar 2025 17:12:01 +0000 (-0400) Subject: .github/workflows,script: add test for missing .qa links X-Git-Tag: testing/wip-pdonnell-testing-20250324.181635-debug~5^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=1b6c0fd00cffd6b2157a03c7fb7e943c5414ccb4;p=ceph-ci.git .github/workflows,script: add test for missing .qa links Signed-off-by: Patrick Donnelly --- diff --git a/.github/workflows/qa-symlink.yml b/.github/workflows/qa-symlink.yml new file mode 100644 index 00000000000..96d8fb98f97 --- /dev/null +++ b/.github/workflows/qa-symlink.yml @@ -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 index 00000000000..6b011a5819a --- /dev/null +++ b/src/script/verify-qa @@ -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