Skip to content

Commit 286bb1d

Browse files
committed
ci: verify the order of the search results
We definitely want the search results for, say, "commit" to show the manual page of that command first. This took quite a bit of work to accomplish, including a change to Pagefind itself (Pagefind/pagefind#534) as well as some extensive fiddling with the ranking weights (including, I kid you not, running a Powell's optimization of the weights). To ensure that the results are shown in the desired order, let's add an explicit check for that in the PR builds. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent b934d2f commit 286bb1d

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,17 @@ jobs:
3333
with:
3434
name: pages
3535
path: pages.tar.gz
36+
37+
- name: verify search results
38+
run: |
39+
set -x
40+
res=0
41+
for term in commit config log rev-parse
42+
do
43+
node ./script/run-pagefind.js "$term" | tee search.results >&2
44+
grep "^1. /docs/git-$term\\.html" search.results || {
45+
echo "::error::Search for $term failed to show the manual page first" >&2
46+
res=1
47+
}
48+
done
49+
exit $res

0 commit comments

Comments
 (0)