If scripts/check fails then prompt and autofix. (#952)
* If scripts/check fails then prompt and autofix * Update scripts/test Co-authored-by: Yeray Diaz Diaz <yeraydiazdiaz@gmail.com> * Update test Co-authored-by: Yeray Diaz Diaz <yeraydiazdiaz@gmail.com>
This commit is contained in:
parent
790a3ead5d
commit
51b70b3fca
16
scripts/test
16
scripts/test
@ -1,14 +1,24 @@
|
||||
#!/bin/sh -e
|
||||
#!/bin/sh
|
||||
|
||||
export PREFIX=""
|
||||
if [ -d 'venv' ] ; then
|
||||
export PREFIX="venv/bin/"
|
||||
fi
|
||||
|
||||
set -x
|
||||
|
||||
if [ -z $GITHUB_ACTIONS ]; then
|
||||
set +e
|
||||
scripts/check
|
||||
while [ $? -ne 0 ]; do
|
||||
read -p "Running 'scripts/check' failed. Do you want to run 'scripts/lint' now? [y/N] " yn
|
||||
case $yn in
|
||||
[Yy]* ) :;;
|
||||
* ) exit;;
|
||||
esac
|
||||
scripts/lint
|
||||
scripts/check
|
||||
done
|
||||
fi
|
||||
|
||||
set -ex
|
||||
|
||||
${PREFIX}pytest $@
|
||||
|
||||
Loading…
Reference in New Issue
Block a user