forked from openwisp/openwrt-openwisp-monitoring
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run-qa-checks
executable file
·34 lines (29 loc) · 901 Bytes
/
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
#!/bin/bash
set -e
luacheck ./openwrt-openwisp-monitoring/ -a
# will be 1 by default when run through github actions
CI=${CI:-0}
if [ "$CI" -eq "1" ]; then
# copy files in github actions so that shell formatter can check for them
cp openwrt-openwisp-monitoring/files/monitoring.agent monitoring_agent
cp openwrt-openwisp-monitoring/files/monitoring.init monitoring_init
else
# check scripts formaating
shellcheck \
install-dev.sh \
qa-format \
run-qa-checks \
runbuild \
runtests \
./openwrt-openwisp-monitoring/files/monitoring.init \
./openwrt-openwisp-monitoring/files/monitoring.agent \
./openwrt-openwisp-monitoring/files/netjson-monitoring
shfmt -d .
shfmt -d openwrt-openwisp-monitoring/files/monitoring.agent
shfmt -d openwrt-openwisp-monitoring/files/monitoring.init
fi
openwisp-qa-check \
--skip-checkmigrations \
--skip-isort \
--skip-flake8 \
--skip-black