Skip to content

Commit

Permalink
Separate tests and coverage reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabio Todaro committed Apr 20, 2021
1 parent e93badc commit e4b911b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ jobs:
python -m pip install --upgrade pip
pip install tox virtualenv
- name: Test build
run: "tox -e ${{ matrix.tox_env }}"
run: "tox -e ${{ matrix.tox_env }}-cov-report"
- name: Send coverage report to codeclimate
uses: paambaati/[email protected]
with:
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ test-all: ## Run tests on every Python version with tox
@tox

.PHONY: coverage
coverage: test ## Check code coverage quickly with the default Python
coverage: ## Check code coverage quickly with the default Python
@echo "+ $@"
@tox -e cov-report
@$(BROWSER) htmlcov/index.html

.PHONY: docs
Expand Down
4 changes: 3 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ passenv =
HOME
commands =
pip install -e .
pytest --cov=cookiecutter --cov-report=term --cov-report=html --cov-report=xml {posargs:tests}
pytest --cov=cookiecutter --cov-report=term {posargs:tests}
cov-report: coverage html
cov-report: coverage xml
deps = -rtest_requirements.txt
skip_install = true

Expand Down

0 comments on commit e4b911b

Please sign in to comment.