From d8ca3b7e2f1d2d83129764b9dec51ac1f34b288a Mon Sep 17 00:00:00 2001 From: jpic Date: Fri, 14 Feb 2020 22:08:48 +0100 Subject: [PATCH] Add test script --- shlaxfile.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/shlaxfile.py b/shlaxfile.py index ca7be7a..931c706 100755 --- a/shlaxfile.py +++ b/shlaxfile.py @@ -1,11 +1,13 @@ #!/usr/bin/env shlax from shlax.contrib.gitlab import * +PYTEST = 'py.test -svv tests' + gitlabci = GitLabCIConfig( Job('test', stage='test', image='yourlabs/python', - script='pip install -U .[test] && py.test -svv tests', + script='pip install -U .[test] && ' + PYTEST, ), Job('pypi', stage='deploy', @@ -14,3 +16,8 @@ gitlabci = GitLabCIConfig( only=['tags'] ), ) + +test = Script( + gitlabci, + Run('gitlab-runner exec docker test'), +)