mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
update jenkins tests to use tox for lint
This commit is contained in:
parent
44aaac1d33
commit
c7a3a7d8bd
2 changed files with 14 additions and 7 deletions
7
.ci/lint
7
.ci/lint
|
@ -16,8 +16,7 @@ pipeline {
|
|||
stage('setup') {
|
||||
steps {
|
||||
sh 'eval "$(pyenv init -)"; pyenv install 2.7.14 || echo "We already have this python."; pyenv local 2.7.14; pyenv shell 2.7.14'
|
||||
sh 'eval "$(pyenv init -)"; pip install pylint SaltPyLint'
|
||||
sh 'eval "$(pyenv init -)"; which pylint; pylint --version'
|
||||
sh 'eval "$(pyenv init -)"; pip install tox'
|
||||
}
|
||||
}
|
||||
stage('linting') {
|
||||
|
@ -25,13 +24,13 @@ pipeline {
|
|||
parallel {
|
||||
stage('salt linting') {
|
||||
steps {
|
||||
sh 'eval "$(pyenv init -)"; pylint --rcfile=.testing.pylintrc --disable=W1307,str-format-in-logging setup.py salt/ | tee pylint-report.xml'
|
||||
sh 'eval "$(pyenv init -)"; tox -e pylint-salt | tee pylint-report.xml'
|
||||
archiveArtifacts artifacts: 'pylint-report.xml'
|
||||
}
|
||||
}
|
||||
stage('test linting') {
|
||||
steps {
|
||||
sh 'eval "$(pyenv init -)"; pylint --rcfile=.testing.pylintrc --disable=W0232,E1002,W1307,str-format-in-logging tests/ | tee pylint-report-tests.xml'
|
||||
sh 'eval "$(pyenv init -)"; tox -e pylint-tests | tee pylint-report-tests.xml'
|
||||
archiveArtifacts artifacts: 'pylint-report-tests.xml'
|
||||
}
|
||||
}
|
||||
|
|
14
tox.ini
14
tox.ini
|
@ -1,5 +1,5 @@
|
|||
[tox]
|
||||
envlist = py27,py34,py35,py36,pylint
|
||||
envlist = py27,py34,py35,py36,pylint-salt,pylint-tests
|
||||
skip_missing_interpreters = True
|
||||
skipsdist = True
|
||||
|
||||
|
@ -9,12 +9,20 @@ commands = pytest --rootdir {toxinidir} {posargs}
|
|||
passenv = LANG HOME
|
||||
sitepackages = True
|
||||
|
||||
[testenv:pylint]
|
||||
[testenv:pylint-salt]
|
||||
basepython = python2.7
|
||||
deps = -r{toxinidir}/requirements/dev.txt
|
||||
commands =
|
||||
pylint --version
|
||||
pylint --rcfile=.testing.pylintrc --disable=W1307,str-format-in-logging setup.py salt/
|
||||
sitepackages = False
|
||||
|
||||
[testenv:pylint-tests]
|
||||
basepython = python2.7
|
||||
deps = -r{toxinidir}/requirements/dev.txt
|
||||
commands =
|
||||
pylint --version
|
||||
pylint --rcfile=.testing.pylintrc --disable=W1307,str-format-in-logging setup.py salt/
|
||||
pylint --rcfile=.testing.pylintrc --disable=W0232,E1002,W1307,str-format-in-logging tests/
|
||||
sitepackages = False
|
||||
|
||||
[pytest]
|
||||
|
|
Loading…
Add table
Reference in a new issue