Projet

Général

Profil

0005-jenkins-also-run-tests-against-django-3.2-64295.patch

Frédéric Péters, 19 avril 2022 07:55

Télécharger (2,96 ko)

Voir les différences:

Subject: [PATCH 5/5] jenkins: also run tests against django 3.2 (#64295)

 Jenkinsfile | 39 +++++++++++++++++++++++++++++++--------
 tox.ini     |  3 ++-
 2 files changed, 33 insertions(+), 9 deletions(-)
Jenkinsfile
5 5
    options { disableConcurrentBuilds() }
6 6
    stages {
7 7
        stage('Unit Tests') {
8
            steps {
9
                sh 'tox -rv'
8
            parallel {
9
                stage('Unit tests django 2.2') {
10
                    agent any
11
                    steps {
12
                        sh 'tox -rv -e py3-django22-codestyle-pylint-coverage'
13
                    }
14
                    post {
15
                        always {
16
                            stash includes:'junit-py3-django22-codestyle-pylint-coverage.xml', name: 'django22'
17
                            script {
18
                                utils = new Utils()
19
                                utils.publish_coverage('coverage.xml')
20
                                utils.publish_coverage_native('index.html')
21
                                utils.publish_pylint('pylint.out')
22
                            }
23
                        }
24
                    }
25
                }
26
                stage('Unit tests django 3.2') {
27
                    agent any
28
                    steps {
29
                        sh 'tox -rv -e py3-django32'
30
                    }
31
                    post {
32
                        always {
33
                            stash includes:'junit-py3-django32.xml', name: 'django32'
34
                        }
35
                    }
36
                }
10 37
            }
11 38
            post {
12 39
                always {
13
                    script {
14
                        utils = new Utils()
15
                        utils.publish_coverage('coverage.xml')
16
                        utils.publish_coverage_native('index.html')
17
                        utils.publish_pylint('pylint.out')
18
                    }
40
                    unstash 'django22'
41
                    unstash 'django32'
19 42
                    mergeJunitResults()
20 43
                }
21 44
            }
tox.ini
1 1
[tox]
2 2
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/wcs/{env:BRANCH_NAME:main}/{env:EXECUTOR_NUMBER:}
3
envlist = py3-django22-codestyle-pylint-coverage
3
envlist = py3-django22-codestyle-pylint-coverage, py3-django32
4 4

  
5 5
[testenv]
6 6
sitepackages = true
......
38 38
    git+https://git.entrouvert.org/debian/django-ckeditor.git
39 39
    git+https://git.entrouvert.org/godo.js.git
40 40
    django22: django>=2.2,<2.3
41
    django32: django>=3.2,<4
41 42
    django-ratelimit<3
42 43
    pyproj
43 44
    astroid!=2.5.7
44
-