Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add py3 linting stage to CI #8

Merged
merged 1 commit into from
May 21, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 25 additions & 7 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,39 @@ pipeline {
}
stage ("Tests") {
parallel {
stage ("Linting Check") {
stage ("Py2.7 Linting Check") {
steps {
script {
env.lint_result = "FAILURE"
env.lint27_result = "FAILURE"
}
bbcGithubNotify(context: "lint/flake8", status: "PENDING")
// Run the linter, excluding build directories (this can also go in the .flake8 config file)
sh 'flake8 --exclude .git,.tox,dist,deb_dist,__pycache__'
bbcGithubNotify(context: "lint/flake8_27", status: "PENDING")
// Run the linter
sh 'python2.7 -m flake8'
script {
env.lint_result = "SUCCESS" // This will only run if the sh above succeeded
env.lint27_result = "SUCCESS" // This will only run if the sh above succeeded
}
}
post {
always {
bbcGithubNotify(context: "lint/flake8", status: env.lint_result)
bbcGithubNotify(context: "lint/flake8_27", status: env.lint27_result)
}
}
}
stage ("Py3 Linting Check") {
steps {
script {
env.lint3_result = "FAILURE"
}
bbcGithubNotify(context: "lint/flake8_3", status: "PENDING")
// Run the linter
sh 'python3 -m flake8'
script {
env.lint3_result = "SUCCESS" // This will only run if the sh above succeeded
}
}
post {
always {
bbcGithubNotify(context: "lint/flake8_3", status: env.lint3_result)
}
}
}
Expand Down