mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
Refactor CI setup
This commit is contained in:
parent
185abe9ca9
commit
413e2de45d
4 changed files with 40 additions and 8 deletions
22
.coveragerc
Normal file
22
.coveragerc
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
[run]
|
||||||
|
branch = True
|
||||||
|
|
||||||
|
[paths]
|
||||||
|
source = vdirsyncer/
|
||||||
|
|
||||||
|
[report]
|
||||||
|
exclude_lines =
|
||||||
|
# Have to re-enable the standard pragma
|
||||||
|
pragma: no cover
|
||||||
|
|
||||||
|
# Don't complain about missing debug-only code:
|
||||||
|
def __repr__
|
||||||
|
if self\.debug
|
||||||
|
|
||||||
|
# Don't complain if tests don't hit defensive assertion code:
|
||||||
|
raise AssertionError
|
||||||
|
raise NotImplementedError
|
||||||
|
|
||||||
|
# Don't complain if non-runnable code isn't run:
|
||||||
|
if 0:
|
||||||
|
if __name__ == .__main__.:
|
||||||
|
|
@ -1,4 +1,7 @@
|
||||||
{
|
{
|
||||||
|
"after_script": [
|
||||||
|
"make -e after-$BUILD"
|
||||||
|
],
|
||||||
"branches": {
|
"branches": {
|
||||||
"only": [
|
"only": [
|
||||||
"auto",
|
"auto",
|
||||||
|
|
|
||||||
22
Makefile
22
Makefile
|
|
@ -28,19 +28,19 @@ install-test: install-servers
|
||||||
git+https://github.com/DRMacIver/hypothesis \
|
git+https://github.com/DRMacIver/hypothesis \
|
||||||
git+https://github.com/pytest-dev/pytest; \
|
git+https://github.com/pytest-dev/pytest; \
|
||||||
fi
|
fi
|
||||||
[ $(CI) != "true" ] || pip install coverage codecov
|
[ $(CI) != "true" ] || pip install pytest-cov codecov
|
||||||
|
|
||||||
test:
|
test:
|
||||||
|
set -e; \
|
||||||
if [ "$(CI)" = "true" ]; then \
|
if [ "$(CI)" = "true" ]; then \
|
||||||
coverage run --branch --concurrency=thread --source=vdirsyncer/ --module pytest; \
|
py.test --cov-config .coveragerc; \
|
||||||
else \
|
else \
|
||||||
py.test; \
|
py.test; \
|
||||||
fi; \
|
fi
|
||||||
STATUS="$$?"; \
|
|
||||||
set -e; \
|
after-test:
|
||||||
[ "$(CI)" != "true" ] || codecov; \
|
[ "$(CI)" != "true" ] || codecov
|
||||||
[ "$(CI)" != "true" ] || scripts/upload-hypothesis-db.sh; \
|
[ "$(CI)" != "true" ] || scripts/upload-hypothesis-db.sh
|
||||||
[ "$$STATUS" = "0" ]
|
|
||||||
|
|
||||||
install-style: install-docs
|
install-style: install-docs
|
||||||
pip install flake8 flake8-import-order flake8-bugbear
|
pip install flake8 flake8-import-order flake8-bugbear
|
||||||
|
|
@ -52,6 +52,9 @@ style:
|
||||||
sphinx-build -W -b html ./docs/ ./docs/_build/html/
|
sphinx-build -W -b html ./docs/ ./docs/_build/html/
|
||||||
python3 scripts/make_travisconf.py | diff -b .travis.yml -
|
python3 scripts/make_travisconf.py | diff -b .travis.yml -
|
||||||
|
|
||||||
|
after-style:
|
||||||
|
true
|
||||||
|
|
||||||
travis-conf:
|
travis-conf:
|
||||||
python3 scripts/make_travisconf.py > .travis.yml
|
python3 scripts/make_travisconf.py > .travis.yml
|
||||||
|
|
||||||
|
|
@ -61,6 +64,9 @@ install-docs:
|
||||||
docs:
|
docs:
|
||||||
cd docs && make html
|
cd docs && make html
|
||||||
|
|
||||||
|
after-docs:
|
||||||
|
true
|
||||||
|
|
||||||
sh: # open subshell with default test config
|
sh: # open subshell with default test config
|
||||||
$$SHELL;
|
$$SHELL;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ make -e install-$BUILD;
|
||||||
"""]
|
"""]
|
||||||
|
|
||||||
cfg['script'] = ["make -e $BUILD"]
|
cfg['script'] = ["make -e $BUILD"]
|
||||||
|
cfg['after_script'] = ["make -e after-$BUILD"]
|
||||||
|
|
||||||
matrix = []
|
matrix = []
|
||||||
cfg['matrix'] = {'include': matrix}
|
cfg['matrix'] = {'include': matrix}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue