aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2023-12-19 21:39:24 +0000
committerArun Isaac2023-12-19 21:40:44 +0000
commit549f7e08d4538bb18b06f1601afad5fdc7159d30 (patch)
tree3f2bcb3784e62e73c6bec3b6ae84f4552fd36694
parent4e407e46ab1db9fdcd18d90c5c0d96eb0ef31ce7 (diff)
downloadgn-auth-549f7e08d4538bb18b06f1601afad5fdc7159d30.tar.gz
guix: Add gn-auth-all-tests.
* .guix/modules/gn-auth.scm: Import python-pylint from (gnu packages check) and python-mypy from (gnu packages python-check). (gn-auth-all-tests): New variable.
-rw-r--r--.guix/modules/gn-auth.scm21
1 files changed, 21 insertions, 0 deletions
diff --git a/.guix/modules/gn-auth.scm b/.guix/modules/gn-auth.scm
index f5f7cac..4c51f96 100644
--- a/.guix/modules/gn-auth.scm
+++ b/.guix/modules/gn-auth.scm
@@ -1,6 +1,8 @@
(define-module (gn-auth)
#:use-module ((gn packages genenetwork)
#:select (gn-auth) #:prefix gn:)
+ #:use-module ((gnu packages check) #:select (python-pylint))
+ #:use-module ((gnu packages python-check) #:select (python-mypy))
#:use-module (guix)
#:use-module (guix gexp)
#:use-module (guix packages)
@@ -23,4 +25,23 @@
#:recursive? #t
#:select? vcs-file?))))
+(define-public gn-auth-all-tests
+ (package
+ (inherit gn-auth)
+ (arguments
+ (substitute-keyword-arguments (package-arguments gn-auth)
+ ((#:phases phases #~%standard-phases)
+ #~(modify-phases #$phases
+ (add-before 'build 'pylint
+ (lambda _
+ (invoke "pylint" "main.py" "setup.py" "wsgi.py"
+ "tests" "gn_auth" "scripts")))
+ (add-after 'pylint 'mypy
+ (lambda _
+ (invoke "mypy" ".")))))))
+ (native-inputs
+ (modify-inputs (package-native-inputs gn-auth)
+ (prepend python-mypy)
+ (prepend python-pylint)))))
+
gn-auth