1
Fork 0
This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
theorangeone.net-legacy/scripts/test

37 lines
764 B
Text
Raw Permalink Normal View History

2017-01-10 09:18:58 +00:00
#!/usr/bin/env bash
export PATH=env/bin:${PATH}
export PATH=node_modules/.bin:${PATH}
FLAKE8_IGNORE=--ignore=E128,E501,E401,E402
set -e
2017-01-15 18:16:21 +00:00
echo "> Running tests"
2017-01-14 23:53:18 +00:00
nose2
2017-01-10 09:18:58 +00:00
2017-01-15 18:16:21 +00:00
echo ">> Testing client-side"
2017-01-10 09:18:58 +00:00
eslint 'theme/static/src/js/'
sass-lint -vqc .sass-lint.yml
2017-01-15 18:16:21 +00:00
echo ">> Running flake8"
2017-01-10 09:18:58 +00:00
flake8 plugins/ $FLAKE8_IGNORE
flake8 config/ $FLAKE8_IGNORE
flake8 tests/ $FLAKE8_IGNORE
2017-01-15 18:16:21 +00:00
flake8 pelicanconf.py $FLAKE8_IGNORE
2017-01-10 09:18:58 +00:00
2017-01-15 18:16:21 +00:00
echo ">> Checking config"
2017-01-13 21:41:40 +00:00
yamllint config/social.yml
2017-01-10 09:18:58 +00:00
2017-01-15 18:16:21 +00:00
echo ">> Running spellcheck"
2017-01-10 09:18:58 +00:00
mdspell --en-gb -ranx theme/templates/**/*.* theme/templates/*.*
mdspell --en-gb -ranx content/**/*.md content/*.md content/**/*.html content/*.html
2017-01-15 18:16:21 +00:00
echo ">> Running security check"
2017-01-10 09:18:58 +00:00
nsp check
2017-01-12 09:27:16 +00:00
safety check
2017-01-10 09:18:58 +00:00
bandit -r plugins/ config/ tests/
2017-01-15 18:16:21 +00:00
echo "> Tests complete!"