generated from ansible-collections/collection_template
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile
37 lines (27 loc) · 1.52 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# requires this collection to be in a directory following this path convention:
# some_dir/ansible_collections/puzzle/opnsense
COLLECTION_PATH=$(realpath ../../../):~/.ansible/collections:/usr/share/ansible/collections
build-doc:
rm -rf dest && mkdir --mode 0700 dest && \
ANSIBLE_COLLECTIONS_PATHS=${COLLECTION_PATH} antsibull-docs sphinx-init --use-current --dest-dir dest puzzle.opnsense > /dev/null && \
cd dest && \
pip install -r requirements.txt >/dev/null && ANSIBLE_COLLECTIONS_PATHS=${COLLECTION_PATH} ./build.sh ; \
echo "\n\nTo view the built doc page visit file://$$PWD/build/html/index.html in a browser of your choice\n\n"
test-unit:
pipenv run ansible-test units --coverage --docker
# runs a little faster because only one version is checked
test-unit-dev:
pipenv run ansible-test units --coverage --python 3.11
test-sanity:
pipenv run ansible-test sanity --docker
test-coverage-report:
pipenv run ansible-test coverage report
test-molecule:
pipenv run molecule test --all
test: test-sanity test-unit test-coverage-report test-molecule
local:
find plugins -type f -name "*.py" -exec sed -i 's/ansible_collections\.puzzle\.opnsense\.plugins\./plugins\./g' {} +
find tests -type f -name "*.py" -exec sed -i 's/ansible_collections\.puzzle\.opnsense\.plugins\./plugins\./g' {} +
ansible:
find plugins -type f -name "*.py" -exec sed -i 's/plugins\./ansible_collections\.puzzle\.opnsense\.plugins\./g' {} +
find tests -type f -name "*.py" -exec sed -i 's/plugins\./ansible_collections\.puzzle\.opnsense\.plugins\./g' {} +