summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.builds/archlinux.yml6
-rw-r--r--.builds/debian_oldstable.yml6
-rw-r--r--.builds/debian_stable.yml6
-rwxr-xr-xcheck42
-rwxr-xr-xrun_coverage4
-rwxr-xr-xrun_qa3
-rwxr-xr-xrun_tests4
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
diff --git a/check b/check
new file mode 100755
index 0000000..8001db4
--- /dev/null
+++ b/check
@@ -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
diff --git a/run_qa b/run_qa
deleted file mode 100755
index f9f643f..0000000
--- a/run_qa
+++ /dev/null
@@ -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