Skip to content

Commit

Permalink
Merge pull request #5385 from hypothesis/add-make-coverage
Browse files Browse the repository at this point in the history
Add `make coverage` and `make codecov`
  • Loading branch information
robertknight committed Oct 18, 2018
2 parents 14dd89d + ea175f7 commit dc8ef4c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 11 deletions.
13 changes: 6 additions & 7 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
[run]
branch = True
parallel = True
source =
h
tests/h
omit =
# development
h/debug.py

# migrations
h/migrations/*

[paths]
source =
src/memex
.tox/*/lib/python*/site-packages/memex
[report]
show_missing = True
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ matrix:
before_script: createdb htest
script: tox
after_success:
tox -e py27-coverage
tox -e py27-codecov
make coverage codecov

- env: ACTION=tox-py3
language: python
Expand Down
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ functests: build/manifest.json
test-py3: node_modules/.uptodate
tox -e py36-tests

.PHONY: coverage
coverage:
tox -e py27-coverage

.PHONY: codecov
codecov:
tox -e py27-codecov

.PHONY: lint
lint:
tox -e py27-lint
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ commands =
lint: flake8 h
lint: flake8 tests
lint: flake8 --select FI14 --exclude 'h/cli/*,tests/h/cli/*,h/util/uri.py,h/migrations/versions/*' h tests
tests: coverage run --parallel --source h,tests/h -m pytest -Werror {posargs:tests/h/}
tests: coverage run -m pytest -Werror {posargs:tests/h/}
functests: pytest -Werror {posargs:tests/functional/}
docs: sphinx-autobuild -BqT -b dirhtml -d {envtmpdir}/doctrees . {envtmpdir}/html
checkdocs: sphinx-build -qTWn -b dirhtml -d {envtmpdir}/doctrees . {envtmpdir}/html
{docstrings,checkdocstrings}: sphinx-apidoc -ePMF -a -H "Dooccsstrinngs!!" --ext-intersphinx --ext-todo --ext-viewcode -o {envtmpdir}/rst .
docstrings: sphinx-autobuild -BqT -z h -z tests -b dirhtml {envtmpdir}/rst {envtmpdir}/dirhtml
checkdocstrings: sphinx-build -qTn -b dirhtml {envtmpdir}/rst {envtmpdir}/dirhtml
coverage: coverage combine
coverage: -coverage combine
coverage: coverage report
codecov: codecov

0 comments on commit dc8ef4c

Please sign in to comment.