Skip to content

Commit 1b6c0fd

Browse files
committed
.github/workflows,script: add test for missing .qa links
Signed-off-by: Patrick Donnelly <[email protected]>
1 parent 46ff6b4 commit 1b6c0fd

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

.github/workflows/qa-symlink.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: "Check for missing .qa links"
3+
on: [pull_request]
4+
5+
jobs:
6+
pull_request:
7+
name: "Check for missing .qa links"
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: checkout ceph.git
11+
uses: actions/checkout@v4
12+
with:
13+
path: ceph
14+
15+
- name: verify .qa links
16+
run: ./src/script/verify-qa
17+
working-directory: ceph

src/script/verify-qa

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
find qa/suites/ -type d -execdir ln -sfT ../.qa/ {}/.qa \;
4+
5+
git add '*.qa'
6+
7+
DIFF=$(git diff --cached)
8+
9+
if [ -z "$DIFF" ]; then
10+
printf 'passed\n'
11+
exit 0
12+
else
13+
printf 'Please apply the following patch:\n\n%s\n' "$DIFF"
14+
exit 1
15+
fi

0 commit comments

Comments
 (0)