diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a126c52..9396106 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -29,7 +29,7 @@ pytest: - pacman -Sy --noconfirm --needed archlinux-keyring && pacman -Su --noconfirm python python-pip sudo git - pip install pytest -r requirements.txt script: - - script -e -c 'python -m pytest -v --junitxml=pytest-report.xml */test_*.py' + - script -e -c './pytest.sh' artifacts: reports: junit: pytest-report.xml diff --git a/format.sh b/format.sh index 1514aee..6860c4e 100755 --- a/format.sh +++ b/format.sh @@ -5,7 +5,7 @@ autoflake_args=('--recursive' '--remove-unused-variables' '--remove-all-unused-i format() { files=("$@") - if [[ -z "${files[@]}" ]]; then + if [[ -z "${files[*]}" ]]; then files=(".") fi @@ -14,8 +14,6 @@ format() { } - - if [[ "$1" == "--check" ]]; then yapf_args+=('--diff') shift diff --git a/pytest.sh b/pytest.sh new file mode 100755 index 0000000..f906f3c --- /dev/null +++ b/pytest.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +sudo -v +python -m pytest -v ./*/test_*.py