diff options
| author | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2022-03-11 18:56:01 +0100 | 
|---|---|---|
| committer | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2022-03-11 18:56:08 +0100 | 
| commit | 673615267436f4dc23ed0fad2fdfef7765908d27 (patch) | |
| tree | be76542362e514b2e53f4a189d398342d69d79e4 | |
| parent | 5b4aa1dd8fe6d52392c127be8ca53d54796255bc (diff) | |
Use one script instead of three for tests etc.
| -rw-r--r-- | .builds/archlinux.yml | 6 | ||||
| -rw-r--r-- | .builds/debian_oldstable.yml | 6 | ||||
| -rw-r--r-- | .builds/debian_stable.yml | 6 | ||||
| -rwxr-xr-x | check | 42 | ||||
| -rwxr-xr-x | run_coverage | 4 | ||||
| -rwxr-xr-x | run_qa | 3 | ||||
| -rwxr-xr-x | run_tests | 4 | 
7 files changed, 54 insertions, 17 deletions
diff --git a/.builds/archlinux.yml b/.builds/archlinux.yml index 58bbb69..b61d55a 100644 --- a/.builds/archlinux.yml +++ b/.builds/archlinux.yml @@ -8,15 +8,17 @@ packages:    - python-nose    - python-coverage    - flake8 +  - isort +  - doc8  sources:    - https://git.sr.ht/~valhalla/lesana  tasks:    - test: |        cd lesana -      sh run_coverage +      sh check coverage    - qa: |        cd lesana -      sh run_qa +      sh check qa  triggers:    - action: email      condition: failure diff --git a/.builds/debian_oldstable.yml b/.builds/debian_oldstable.yml index b61284a..86158e3 100644 --- a/.builds/debian_oldstable.yml +++ b/.builds/debian_oldstable.yml @@ -8,15 +8,17 @@ packages:    - python3-nose    - python3-coverage    - flake8 +  - isort +  - doc8  sources:    - https://git.sr.ht/~valhalla/lesana  tasks:    - test: |        cd lesana -      sh run_coverage +      sh check coverage    - qa: |        cd lesana -      sh run_qa +      sh check qa  triggers:    - action: email      condition: failure diff --git a/.builds/debian_stable.yml b/.builds/debian_stable.yml index c4fdc37..7ef54ea 100644 --- a/.builds/debian_stable.yml +++ b/.builds/debian_stable.yml @@ -8,15 +8,17 @@ packages:    - python3-nose    - python3-coverage    - flake8 +  - doc8 +  - isort  sources:    - https://git.sr.ht/~valhalla/lesana  tasks:    - test: |        cd lesana -      sh run_coverage +      sh check coverage    - qa: |        cd lesana -      sh run_qa +      sh check qa  triggers:    - action: email      condition: failure @@ -0,0 +1,42 @@ +#!/bin/sh + +set -e + +if [ $# -lt 1 ] +then +    $0 coverage +    $0 typecheck +    $0 qa +    exit 0 +fi + +export PYTHONDEVMODE=1 + +SUBCMD=$1 +shift 1 + +case $SUBCMD in +    "tests") +        #nose2-3 $COVER_OPT --log-level=ERROR -B --log-capture $* +        nosetests3 $* +        ;; +    "coverage") +        #nose2-3 --with-coverage --coverage-report=term \ +        #    --log-level=ERROR -B --log-capture $* +        nosetests3 --with-coverage --cover-erase --cover-package=lesana $* +        ;; +    "qa") +        flake8 --select=E,F,W,C90,E123 --ignore=W503 . +        isort --check-only --diff . +        doc8 . +        ;; +    "typecheck") +        mypy lesana +        ;; +    "static") +        bandit --recursive --number=3 -lll -iii . +        ;; +    *) +        echo "No such subcommand $SUBCMD" +        ;; +esac diff --git a/run_coverage b/run_coverage deleted file mode 100755 index ac67ea1..0000000 --- a/run_coverage +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -nosetests3 --with-coverage --cover-erase --cover-package=lesana -#nose2-3 --with-coverage --coverage-report=term --log-level=ERROR -B --log-capture @@ -1,3 +0,0 @@ -#!/bin/sh - -flake8 --select=E,F,W,C90,E123 --ignore=W503 . diff --git a/run_tests b/run_tests deleted file mode 100755 index b4f44f1..0000000 --- a/run_tests +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -nosetests3 -#nose2-3 --log-level=ERROR -B --log-capture  | 
