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/runtests

31 lines
648 B
Text
Raw Normal View History

2016-11-22 21:50:21 +00:00
#!/usr/bin/env bash
set -e
2016-11-27 22:06:50 +00:00
echo "> Starting Tests..."
2016-11-26 16:01:14 +00:00
export PATH=node_modules/.bin:${PATH}
2016-11-22 21:50:21 +00:00
export PATH=env/bin:${PATH}
export DEBUG=true
export IN_TEST=true
export SECRET_KEY='secrit'
2016-11-27 22:06:50 +00:00
echo ">> Running flake8..."
2016-11-27 22:01:15 +00:00
flake8 project --ignore=E128,E501 --exclude=migrations,wsgi.py
2016-11-27 22:06:50 +00:00
echo ">> Running backend unit tests..."
2016-11-22 21:50:21 +00:00
coverage run --source=project --omit='*/wsgi.py,*/settings.py,*/migrations/*.py,*__init__.py' manage.py test $@
coverage report
2016-11-27 22:06:50 +00:00
echo ">> Testing client-side"
2016-11-27 21:21:06 +00:00
eslint static/src
sass-lint -vqc .sass-lint.yml
2016-11-26 15:54:31 +00:00
2016-11-27 22:06:50 +00:00
echo ">> Checking Security..."
2016-11-26 15:54:31 +00:00
bandit -r project/ manage.py
safety check
2016-11-26 16:01:14 +00:00
nsp check
snyk test
2016-11-27 22:06:50 +00:00
echo "> Tests complete!"