Skip to content

Commit

Permalink
check version bump on library modifications (#448)
Browse files Browse the repository at this point in the history
* check version bump on library modifications

* add env to whitelist

* add extra space for gh

* address PR comments
  • Loading branch information
lucabello authored Feb 3, 2023
1 parent ecefc79 commit 4f8de1b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,14 @@ deps =
integration: pytest-operator==1.0.0b1
commands =
charm: mypy {[vars]src_path} {posargs}
lib: mypy --python-version 3.5 {[vars]lib_path} {posargs}
lib: mypy --python-version 3.8 {[vars]lib_path} {posargs}
/usr/bin/env sh -c 'for m in $(git diff --name-only {[vars]lib_path}); do \
if ! git diff $m | grep -q "+LIBPATCH\|+LIBAPI"; then \
echo "You forgot to bump the version on $m!"; exit 1; \
fi; done'
unit: mypy {[vars]tst_path}/unit {posargs}
integration: mypy {[vars]tst_path}/integration {posargs}
allowlist_externals = /usr/bin/env

[testenv:unit]
description = Run unit tests
Expand Down

0 comments on commit 4f8de1b

Please sign in to comment.