diff --git a/Jenkinsfile b/Jenkinsfile index dc6df67..a9aff2f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -2,7 +2,16 @@ pipeline { agent any + options { + disableConcurrentBuilds() + timeout(time: 30, unit: 'MINUTES') + } stages { + stage('Unit Tests') { + steps { + sh 'tox -rv' + } + } stage('Packaging') { steps { script { diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..ec20e3a --- /dev/null +++ b/tox.ini @@ -0,0 +1,10 @@ +[tox] +envlist = py3-codestyle +toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/passerelle-grandlyon-iodas/{env:BRANCH_NAME:} + +[testenv] +usedevelop = True +deps = + codestyle: pre-commit +commands = + codestyle: pre-commit run --all-files --show-diff-on-failure