Debian Codegraph @

ansible_collections/vmware/vmware_rest/Makefile

raw
1 # setup commands
2 .PHONY: upgrade-collections
3 upgrade-collections:
4 ansible-galaxy collection install --upgrade -p ~/.ansible/collections .
5
6 .PHONY: install-collection-python-reqs
7 install-collection-python-reqs:
8 pip install -r requirements.txt
9
10 .PHONY: install-integration-reqs
11 install-integration-reqs: install-collection-python-reqs
12 pip install -r tests/integration/requirements.txt; \
13 ansible-galaxy collection install --upgrade -p ~/.ansible/collections -r tests/integration/requirements.yml
14
15 tests/integration/integration_config.yml:
16 chmod +x ./tests/integration/generate_integration_config.sh; \
17 ./tests/integration/generate_integration_config.sh
18
19 # test commands
20 .PHONY: linters
21 linters: ## Run extra linter tests
22 @pip install -r linters.requirements.txt; err=0; echo "\nStart tests.\n"; \
23 black --check --diff --color . || err=1; \
24 if [ "$$err" = 1 ]; then echo "\nAt least one linter failed\n" >&2; exit 1; fi
25
26 .PHONY: sanity
27 sanity: upgrade-collections
28 cd ~/.ansible/collections/ansible_collections/vmware/vmware_rest; \
29 ansible-test sanity -v --color --coverage --junit --docker default
30
31 .PHONY: eco-vcenter-ci
32 eco-vcenter-ci: tests/integration/integration_config.yml install-integration-reqs upgrade-collections
33 rm -rf ~/.ansible/collections/ansible_collections/cloud/common; \
34 cd ~/.ansible/collections/ansible_collections/vmware/vmware_rest; \
35 ansible --version; \
36 ansible-test --version; \
37 ANSIBLE_COLLECTIONS_PATH=~/.ansible/collections/ansible_collections ansible-galaxy collection list; \
38 chmod +x tests/integration/run_eco_vcenter_ci.sh; \
39 ANSIBLE_ROLES_PATH=~/.ansible/collections/ansible_collections/vmware/vmware_rest/tests/integration/targets \
40 ANSIBLE_COLLECTIONS_PATH=~/.ansible/collections/ansible_collections \
41 ./tests/integration/run_eco_vcenter_ci.sh