-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathrun_tests.sh
executable file
·30 lines (26 loc) · 932 Bytes
/
run_tests.sh
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
#!/bin/bash -e
BASE_DIR=`dirname "$0"`
GMP_DIR="${BASE_DIR}"/gmusicprocurator
STATIC_DIR="${GMP_DIR}"/static
SCSS_DIR="${STATIC_DIR}"/scss
MAIN_OUT_CSS="${SCSS_DIR}"/main.out.css
CFG_DIR="$HOME/.config/gmusicapi"
CFG_PATH="$CFG_DIR"/gmusicprocurator.cfg
NODE_BIN_DIR="${BASE_DIR}/node_modules/.bin"
set -x
if [[ -z "$NO_PYTHON" ]]; then
flake8 "${GMP_DIR}"
pep257 gmusicprocurator
python setup.py check --metadata --restructuredtext --strict
fi
if [[ -z "$NO_FRONTEND" ]]; then
"$NODE_BIN_DIR"/coffeelint -f "${BASE_DIR}"/.coffeelint.json "${STATIC_DIR}"/cs
scss-lint -e '*.css' "${SCSS_DIR}"
scss --style expanded "${SCSS_DIR}"/main.scss "${MAIN_OUT_CSS}"
"$NODE_BIN_DIR"/csslint "${MAIN_OUT_CSS}"
if [[ ! -f "$CFG_PATH" ]]; then
mkdir -p "$CFG_DIR"
echo 'GMP_OFFLINE_MODE = True' > "$CFG_PATH"
fi
GMP_OFFLINE_MODE=1 python -m gmusicprocurator assets build --no-cache
fi