Browse Source

[UPD] cookies with latest changes

Signed-off-by: Justin Lecher <justin@jlec.de>
master
Justin Lecher 3 days ago
parent
commit
694a895ee8
Signed by: justin GPG Key ID: E9402A79B03529A2
  1. 36
      {{ cookiecutter.ansible_collection }}/Makefile
  2. 8
      {{ cookiecutter.ansible_collection }}/Pipfile

36
{{ cookiecutter.ansible_collection }}/Makefile

@ -1,6 +1,7 @@
ROLES := $(wildcard roles/*/.)
PIPENV := pipenv run
PYTESTARGS ?= -x -vvl
BLACKARGS := --line-length 128 --check --diff
.PHONY: help
@ -54,20 +55,30 @@ publish:
git push -v --progress
git push -v --progress --tags
################################################################################
#
# Cookies options
#
################################################################################
.PHONY: cruft-update
cruft-update: setup-dev.done
git stash
$(PIPENV) cruft update --allow-untracked-files
git stash pop
################################################################################
#
# Checking and Linting
#
################################################################################
.PHONY: ansible-lint black check cruft-check lint linting pytest test
.PHONY: check cruft-check pre-commit lint linting test $(ROLES)
check: cruft-check lint test
check: cruft-check lint
cruft-check: setup-dev.done
$(PIPENV) cruft check
$(PIPENV) cruft diff --exit-code
test: $(ROLES)
$(PIPENV) cruft diff
pre-commit: setup-dev.done
$(PIPENV) pre-commit run --all-files
@ -75,20 +86,17 @@ pre-commit: setup-dev.done
lint: linting
linting: pre-commit
test: $(ROLES)
$(ROLES):
$(MAKE) -C $@ test
################################################################################
#
# Custom options
#
################################################################################
.PHONY: clean cruft-update $(ROLES)
cruft-update: setup-dev.done
git stash
$(PIPENV) cruft update --allow-untracked-files
git stash pop
$(ROLES):
$(MAKE) -C $@ test
.PHONY: clean
clean:
rm -rvf tmp setup*done

8
{{ cookiecutter.ansible_collection }}/Pipfile

@ -7,12 +7,16 @@ verify_ssl = true
ansible = "*"
ansible-lint = "*"
black = "*"
cruft = "*"
bumpversion = "*"
cruft = "*"
molecule = {extras = [ "ansible", "docker", "lint" ], version = "*"}
pre-commit = "*"
pytest = "*"
PyYAML = "*"
pytest = "<6"
pytest-cookies = "*"
pytest-parallel = "*"
pytest-testinfra = "*"
pytest-xdist = "<2"
yamllint = "*"
[packages]

Loading…
Cancel
Save