forked from outech-robotic/code
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
53 lines (53 loc) · 1.81 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
pipeline {
agent {
docker {
image 'python:3.7'
}
}
stages {
stage('build') {
steps {
sh 'python --version'
sh 'pip install pipenv'
sh 'pipenv install -d'
}
}
stage('unit-tests') {
steps {
sh 'mkdir reports'
sh 'pipenv run pytest --cov=highlevel --junitxml reports/junit.xml --cov-report xml:reports/coverage.xml highlevel'
}
post {
always {
junit 'reports/*.xml'
step([$class: 'CoberturaPublisher',
autoUpdateHealth: false,
autoUpdateStability: false,
coberturaReportFile: 'reports/coverage.xml',
failNoReports: false,
failUnhealthy: false,
failUnstable: false,
maxNumberOfBuilds: 10,
onlyStable: false,
sourceEncoding: 'ASCII',
zoomCoverageChart: false])
}
}
}
stage('ensure code is yapf formatted') {
steps {
sh 'pipenv run yapf -p -d -r highlevel || (echo "!!!!!!!!!!! Please run yapf -i -r highlevel/ on your code"; exit 1)'
}
}
stage('lint') {
steps {
sh 'pipenv run pylint highlevel'
}
}
stage('mypy') {
steps {
sh 'pipenv run mypy --disallow-untyped-calls --ignore-missing-imports --disallow-incomplete-defs highlevel'
}
}
}
}