forked from openwisp/openwisp-docs
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun-qa-checks
More file actions
executable file
·42 lines (36 loc) · 916 Bytes
/
Copy pathrun-qa-checks
File metadata and controls
executable file
·42 lines (36 loc) · 916 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
set -e
# openwisp-utils checks
# This is done first to ignore build directories for openwisp-utils checks
openwisp-qa-check \
--skip-checkmigrations \
--skip-checkmakemigrations\
--skip-isort \
--skip-flake8 \
--skip-black \
--skip-checkendline \
--csslinter \
--jslinter
echo ''
echo 'Build documentation to look for syntax errors'
make build
# check for broken link
cd _build/
python -m http.server 8001 &> /dev/null & pid=$!
sleep 4
BASE_URL="http://localhost:8001"
if [ -n "${PRODUCTION:-}" ]; then
BASE_URL="$BASE_URL/docs/"
fi
pylinkvalidate.py "$BASE_URL/dev/" \
-w 4 -m process
kill "${pid}"
cd ..
# Verify PDFs are valid
find _build/ -type f -name "*.pdf" | while read -r pdf; do
if ! pdfinfo "$pdf"; then
echo "$pdf is broken"
fi
done
python sort_spelling_wordlist.py --qa || \
(echo "Spelling Vocabulary not up to date"; exit 1)