forked from openwisp/openwisp-radius
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run-qa-checks
executable file
·47 lines (39 loc) · 1.15 KB
/
run-qa-checks
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
43
44
45
46
47
#!/bin/bash
set -e
echo ''
echo 'Checking documentation build status'
./runsphinx-build
PYTHON_VERSION=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
if [[ $PYTHON_VERSION != 3.6 ]]; then
# check for broken link
# remove condition when 3.6 is dropped
python -m http.server 8001 -d docs/build/html/ &>/dev/null &
pid=$!
sleep 4
pylinkvalidate.py http://localhost:8001/
kill "${pid}" 2> /dev/null || true
fi
rm -rf docs/build/
echo ''
echo 'Check JavaScript Linting'
jslint ./openwisp_radius/static/openwisp-radius/js/*.js
echo ''
echo 'Compiling translations'
cd openwisp_radius
django-admin compilemessages
cd ..
echo ''
echo 'Running checks for openwisp-radius'
openwisp-qa-check \
--migration-path "./openwisp_radius/migrations"
echo ''
echo 'Running checks for SAMPLE_APP'
SAMPLE_APP=1 openwisp-qa-check \
--skip-isort \
--skip-flake8 \
--skip-black \
--skip-checkmigrations \
--skip-checkendline \
--skip-checkcommit \
--migration-path "./tests/openwisp2/sample_radius/migrations
./tests/openwisp2/sample_users/migrations"