Skip to content

Commit

Permalink
Update coveragespace
Browse files Browse the repository at this point in the history
  • Loading branch information
jacebrowning committed Jan 1, 2021
1 parent b51a842 commit 1ab25ec
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 36 deletions.
35 changes: 13 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
# Project settings
PROJECT := GitMan
PACKAGE := gitman
REPOSITORY := jacebrowning/gitman

# Project paths
PACKAGES := $(PACKAGE) tests
CONFIG := $(wildcard *.py)
MODULES := $(wildcard $(PACKAGE)/*.py)

# Virtual environment paths
VIRTUAL_ENV ?= .venv

# MAIN TASKS ##################################################################

.PHONY: all
Expand Down Expand Up @@ -74,6 +64,7 @@ doctor: ## Confirm system dependencies are available

# PROJECT DEPENDENCIES ########################################################

VIRTUAL_ENV ?= .venv
DEPENDENCIES := $(VIRTUAL_ENV)/.poetry-$(shell bin/checksum pyproject.toml poetry.lock)

.PHONY: install
Expand All @@ -97,18 +88,18 @@ endif

.PHONY: format
format: install
poetry run isort $(PACKAGES)
poetry run black $(PACKAGES)
poetry run isort $(PACKAGE) tests
poetry run black $(PACKAGE) tests
@ echo

.PHONY: check
check: install format ## Run formaters, linters, and static analysis
ifdef CI
git diff --exit-code
endif
poetry run mypy $(PACKAGES) --config-file=.mypy.ini
poetry run pylint $(PACKAGES) --rcfile=.pylint.ini
poetry run pydocstyle $(PACKAGES) $(CONFIG)
poetry run mypy $(PACKAGE) tests --config-file=.mypy.ini
poetry run pylint $(PACKAGE) tests --rcfile=.pylint.ini
poetry run pydocstyle $(PACKAGE) tests

# TESTS #######################################################################

Expand All @@ -129,21 +120,21 @@ test-unit: install
@ ( mv $(FAILURES) $(FAILURES).bak || true ) > /dev/null 2>&1
poetry run pytest $(PACKAGE) $(PYTEST_OPTIONS)
@ ( mv $(FAILURES).bak $(FAILURES) || true ) > /dev/null 2>&1
poetry run coveragespace $(REPOSITORY) unit
poetry run coveragespace update unit

.PHONY: test-int
test-int: install
@ if test -e $(FAILURES); then TEST_INTEGRATION=true poetry run pytest tests $(PYTEST_RERUN_OPTIONS); fi
@ rm -rf $(FAILURES)
TEST_INTEGRATION=true poetry run pytest tests $(PYTEST_OPTIONS)
poetry run coveragespace $(REPOSITORY) integration
poetry run coveragespace update integration

.PHONY: test-all
test-all: install
@ if test -e $(FAILURES); then TEST_INTEGRATION=true poetry run pytest $(PACKAGES) $(PYTEST_RERUN_OPTIONS); fi
@ if test -e $(FAILURES); then TEST_INTEGRATION=true poetry run pytest $(PACKAGE) tests $(PYTEST_RERUN_OPTIONS); fi
@ rm -rf $(FAILURES)
TEST_INTEGRATION=true poetry run pytest $(PACKAGES) $(PYTEST_OPTIONS)
poetry run coveragespace $(REPOSITORY) overall
TEST_INTEGRATION=true poetry run pytest $(PACKAGE) tests $(PYTEST_OPTIONS)
poetry run coveragespace update overall

.PHONY: read-coverage
read-coverage:
Expand Down Expand Up @@ -215,7 +206,7 @@ $(PACKAGE).spec:
upload: dist ## Upload the current version to PyPI
git diff --name-only --exit-code
poetry publish
bin/open https://pypi.org/project/$(PROJECT)
bin/open https://pypi.org/project/$(PACKAGE)

# CLEANUP #####################################################################

Expand All @@ -228,7 +219,7 @@ clean-all: clean

.PHONY: .clean-install
.clean-install:
find $(PACKAGES) -name '__pycache__' -delete
find $(PACKAGE) tests -name '__pycache__' -delete
rm -rf *.egg-info

.PHONY: .clean-test
Expand Down
26 changes: 13 additions & 13 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ pytest-random = "*"
freezegun = "*"

# Reports
coveragespace = "*"
coveragespace = "^4.0"

# Documentation
mkdocs = "~1.0"
Expand Down

0 comments on commit 1ab25ec

Please sign in to comment.