Skip to content

Commit c285207

Browse files
committed
CI: use pdm in CI
1 parent 33efa1d commit c285207

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

Jenkinsfile

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ node {
77
checkout scm
88

99
sh '''
10+
export PATH=/var/lib/jenkins/.local/bin:$PATH # needed for pdm
1011
cd $WORKSPACE
1112
git fetch --tags
12-
rm -rf venv && python3 -m venv venv
13-
. venv/bin/activate
14-
pip3 install -r requirements_dev.txt
13+
pdm venv remove -y in-project || echo "No pdm venv so far, continuing"
14+
pdm sync --clean
1515
cat <<ENDOFFILE > my.cnf
1616
[client]
1717
database = pytition
@@ -44,23 +44,22 @@ mysql --defaults-extra-file=$PWD/my.cnf -e "drop database pytition; create datab
4444
4545
echo "Running database migrations"
4646
47-
cd pytition && python3 ./manage.py migrate && cd -
47+
cd pytition && pdm run python3 ./manage.py migrate && cd -
4848
4949
echo "Generating documentation"
5050
51-
cd doc && make html
51+
cd doc && pdm run make html
5252
cd -
5353
5454
echo "Compiling translations"
5555
56-
cd pytition && python3 ./manage.py compilemessages && cd -
56+
cd pytition && pdm run python3 ./manage.py compilemessages && cd -
5757
5858
echo "Running tests"
5959
60-
coverage erase
61-
coverage run ./pytition/manage.py test --noinput petition
62-
coverage xml --include='pytition/*'
63-
deactivate
60+
pdm run coverage erase
61+
pdm run coverage run ./pytition/manage.py test --noinput petition
62+
pdm run coverage xml --include='pytition/*'
6463
'''
6564
step([$class: 'CoberturaPublisher',
6665
autoUpdateHealth: false,

0 commit comments

Comments
 (0)