add shellscript for running pytest, shellcheck *.sh

This commit is contained in:
InsanePrawn 2022-08-16 18:20:06 +02:00
parent 8b9fe661cf
commit e17a69ed81
3 changed files with 6 additions and 4 deletions

View file

@ -29,7 +29,7 @@ pytest:
- pacman -Sy --noconfirm --needed archlinux-keyring && pacman -Su --noconfirm python python-pip sudo git - pacman -Sy --noconfirm --needed archlinux-keyring && pacman -Su --noconfirm python python-pip sudo git
- pip install pytest -r requirements.txt - pip install pytest -r requirements.txt
script: script:
- script -e -c 'python -m pytest -v --junitxml=pytest-report.xml */test_*.py' - script -e -c './pytest.sh'
artifacts: artifacts:
reports: reports:
junit: pytest-report.xml junit: pytest-report.xml

View file

@ -5,7 +5,7 @@ autoflake_args=('--recursive' '--remove-unused-variables' '--remove-all-unused-i
format() { format() {
files=("$@") files=("$@")
if [[ -z "${files[@]}" ]]; then if [[ -z "${files[*]}" ]]; then
files=(".") files=(".")
fi fi
@ -14,8 +14,6 @@ format() {
} }
if [[ "$1" == "--check" ]]; then if [[ "$1" == "--check" ]]; then
yapf_args+=('--diff') yapf_args+=('--diff')
shift shift

4
pytest.sh Executable file
View file

@ -0,0 +1,4 @@
#!/bin/bash
sudo -v
python -m pytest -v ./*/test_*.py