Merge pull request #153 from ryanmerolle/housekeeping

housekeeping
This commit is contained in:
Ryan Merolle 2023-06-23 17:22:45 -04:00 committed by GitHub
commit d9cf49a45c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 3 deletions

View File

@ -2,6 +2,7 @@ autoflake
autopep8
bandit
black
coverage
flake8
isort
mypy

15
.gitignore vendored
View File

@ -163,3 +163,18 @@ cython_debug/
.vscode/
# JetBrains
.idea/
# Temporary files
*.tmp
tmp/
# coverage
coverage/
htmlcov/
.coverage
.coverage.*
coverage.xml
*.cover
# ruff
.ruff_cache/

View File

@ -75,8 +75,15 @@ rebuild: setup makemigrations migrate collectstatic start
.PHONY: test
test: setup
${VENV_PY_PATH} ${NETBOX_MANAGE_PATH}/manage.py makemigrations ${PLUGIN_NAME} --check
${VENV_PY_PATH} ${NETBOX_MANAGE_PATH}/manage.py test ${PLUGIN_NAME}
${NETBOX_MANAGE_PATH}/manage.py makemigrations ${PLUGIN_NAME} --check
coverage run --source "netbox_acls" ${NETBOX_MANAGE_PATH}/manage.py test ${PLUGIN_NAME} -v 2
.PHONY: coverage_report
coverage_report:
coverage report
.PHONY: test_coverage
test_coverage: test coverage_report
#relpatch:
# $(eval GSTATUS := $(shell git status --porcelain))

View File

@ -17,7 +17,7 @@ doco="docker compose --file docker-compose.yml"
test_netbox_unit_tests() {
echo "⏱ Running NetBox Unit Tests"
$doco run --rm netbox python manage.py makemigrations netbox_acls --check
$doco run --rm netbox python manage.py test netbox_acls
$doco run --rm netbox python manage.py test netbox_acls -v 2
}
test_cleanup() {