Skip to content

Commit

Permalink
CI: use pdm in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
fallen committed Apr 4, 2024
1 parent 33efa1d commit c285207
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<ENDOFFILE > my.cnf
[client]
database = pytition
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit c285207

Please sign in to comment.