mirror of
https://github.com/NaN-tic/trytond-farm_feed_production.git
synced 2023-12-14 05:52:53 +01:00
Modify tox and add Jenkisfile
This commit is contained in:
parent
0c347b61d6
commit
c9422deaa5
2 changed files with 69 additions and 0 deletions
50
Jenkinsfile
vendored
Normal file
50
Jenkinsfile
vendored
Normal file
|
@ -0,0 +1,50 @@
|
|||
pipeline {
|
||||
agent {
|
||||
docker {
|
||||
image 'python:3.7'
|
||||
args '--user 0:0'
|
||||
}
|
||||
}
|
||||
stages {
|
||||
stage('setup') {
|
||||
steps {
|
||||
sh 'pip install tox coverage'
|
||||
}
|
||||
}
|
||||
stage('test'){
|
||||
steps {
|
||||
sh 'tox'
|
||||
}
|
||||
|
||||
}
|
||||
stage("Extract test results") {
|
||||
steps{
|
||||
cobertura autoUpdateHealth: false, autoUpdateStability: false, coberturaReportFile: 'coverage.xml', conditionalCoverageTargets: '70, 0, 0', enableNewApi: true, failUnhealthy: false, failUnstable: false, lineCoverageTargets: '80, 0, 0', maxNumberOfBuilds: 0, methodCoverageTargets: '80, 0, 0', onlyStable: false, sourceEncoding: 'ASCII', zoomCoverageChart: false
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
changed {
|
||||
emailext subject: '$DEFAULT_SUBJECT',
|
||||
body: '$DEFAULT_CONTENT',
|
||||
recipientProviders: [
|
||||
[$class: 'CulpritsRecipientProvider'],
|
||||
[$class: 'DevelopersRecipientProvider'],
|
||||
[$class: 'RequesterRecipientProvider']
|
||||
],
|
||||
replyTo: '$DEFAULT_REPLYTO',
|
||||
to: '$DEFAULT_RECIPIENTS'
|
||||
}
|
||||
failure {
|
||||
emailext subject: '$DEFAULT_SUBJECT',
|
||||
body: '$DEFAULT_CONTENT',
|
||||
recipientProviders: [
|
||||
[$class: 'CulpritsRecipientProvider'],
|
||||
[$class: 'DevelopersRecipientProvider'],
|
||||
[$class: 'RequesterRecipientProvider']
|
||||
],
|
||||
replyTo: '$DEFAULT_REPLYTO',
|
||||
to: '$DEFAULT_RECIPIENTS'
|
||||
}
|
||||
}
|
||||
}
|
19
tox.ini
Normal file
19
tox.ini
Normal file
|
@ -0,0 +1,19 @@
|
|||
[tox]
|
||||
envlist = py37-sqlite, stats
|
||||
|
||||
[testenv]
|
||||
basepython=python3.7
|
||||
commands = coverage run setup.py test
|
||||
deps =
|
||||
sqlite: sqlitebck
|
||||
coverage
|
||||
setenv =
|
||||
sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://}
|
||||
sqlite: DB_NAME={env:SQLITE_NAME::memory:}
|
||||
install_command = pip install --pre --find-links https://trydevpi.tryton.org/ {opts} {packages}
|
||||
|
||||
[testenv:stats]
|
||||
basepython=python3.7
|
||||
commands =
|
||||
coverage report --omit=.tox/*
|
||||
coverage xml
|
Loading…
Reference in a new issue