-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.py
31 lines (27 loc) · 1.13 KB
/
build.py
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
# -*- coding: utf-8 -*-
from pybuilder.core import use_plugin, init
use_plugin("python.core")
use_plugin("python.unittest")
use_plugin("python.flake8")
use_plugin("python.coverage")
use_plugin("python.distutils")
use_plugin("python.install_dependencies")
use_plugin("python.integrationtest")
name = "Template-PythonProject"
default_task = "publish"
@init
def set_properties(project):
project.build_depends_on("mockito")
project.depends_on("requests")
project.set_property("coverage_threshold_warn", 90)
project.set_property("coverage_branch_threshold_warn", 80)
project.set_property("coverage_branch_partial_threshold_warn", 80)
# Properties to fail build on Flake8 warnings
project.build_depends_on('flake8')
project.set_property('flake8_verbose_output', True)
project.set_property("flake8_break_build", True)
project.set_property("flake8_include_test_sources", True)
project.set_property("flake8_include_scripts", True)
# Property for integration test to work on Windows
# see https://github.com/pybuilder/pybuilder/issues/414
project.set_property("integrationtest_inherit_environment", True)