From c285207dfa076dab2bb6ceae063411ed784eca94 Mon Sep 17 00:00:00 2001 From: Yann Sionneau Date: Fri, 5 Apr 2024 00:17:51 +0200 Subject: [PATCH] CI: use pdm in CI --- Jenkinsfile | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a93125ab..21052fbb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -7,11 +7,11 @@ node { checkout scm sh ''' +export PATH=/var/lib/jenkins/.local/bin:$PATH # needed for pdm cd $WORKSPACE git fetch --tags -rm -rf venv && python3 -m venv venv -. venv/bin/activate -pip3 install -r requirements_dev.txt +pdm venv remove -y in-project || echo "No pdm venv so far, continuing" +pdm sync --clean cat < my.cnf [client] database = pytition @@ -44,23 +44,22 @@ mysql --defaults-extra-file=$PWD/my.cnf -e "drop database pytition; create datab echo "Running database migrations" -cd pytition && python3 ./manage.py migrate && cd - +cd pytition && pdm run python3 ./manage.py migrate && cd - echo "Generating documentation" -cd doc && make html +cd doc && pdm run make html cd - echo "Compiling translations" -cd pytition && python3 ./manage.py compilemessages && cd - +cd pytition && pdm run python3 ./manage.py compilemessages && cd - echo "Running tests" -coverage erase -coverage run ./pytition/manage.py test --noinput petition -coverage xml --include='pytition/*' -deactivate +pdm run coverage erase +pdm run coverage run ./pytition/manage.py test --noinput petition +pdm run coverage xml --include='pytition/*' ''' step([$class: 'CoberturaPublisher', autoUpdateHealth: false,