From e0899c9f5deba5f9cc027514ae36f9213fdb5427 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Thu, 22 Jun 2023 08:47:12 +0200 Subject: [PATCH] ci: add pre-commit checks (#78863) --- Jenkinsfile | 9 +++++++++ tox.ini | 10 ++++++++++ 2 files changed, 19 insertions(+) create mode 100644 tox.ini 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