forked from ansible-collections/vmware.vmware_rest
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (35 loc) · 1.76 KB
/
Makefile
File metadata and controls
41 lines (35 loc) · 1.76 KB
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
38
39
40
41
# setup commands
.PHONY: upgrade-collections
upgrade-collections:
ansible-galaxy collection install --upgrade -p ~/.ansible/collections .
.PHONY: install-collection-python-reqs
install-collection-python-reqs:
pip install -r requirements.txt
.PHONY: install-integration-reqs
install-integration-reqs: install-collection-python-reqs
pip install -r tests/integration/requirements.txt; \
ansible-galaxy collection install --upgrade -p ~/.ansible/collections -r tests/integration/requirements.yml
tests/integration/integration_config.yml:
chmod +x ./tests/integration/generate_integration_config.sh; \
./tests/integration/generate_integration_config.sh
# test commands
.PHONY: linters
linters: ## Run extra linter tests
@pip install -r linters.requirements.txt; err=0; echo "\nStart tests.\n"; \
black --check --diff --color . || err=1; \
if [ "$$err" = 1 ]; then echo "\nAt least one linter failed\n" >&2; exit 1; fi
.PHONY: sanity
sanity: upgrade-collections
cd ~/.ansible/collections/ansible_collections/vmware/vmware_rest; \
ansible-test sanity -v --color --coverage --junit --docker default
.PHONY: eco-vcenter-ci
eco-vcenter-ci: tests/integration/integration_config.yml install-integration-reqs upgrade-collections
rm -rf ~/.ansible/collections/ansible_collections/cloud/common; \
cd ~/.ansible/collections/ansible_collections/vmware/vmware_rest; \
ansible --version; \
ansible-test --version; \
ANSIBLE_COLLECTIONS_PATH=~/.ansible/collections/ansible_collections ansible-galaxy collection list; \
chmod +x tests/integration/run_eco_vcenter_ci.sh; \
ANSIBLE_ROLES_PATH=~/.ansible/collections/ansible_collections/vmware/vmware_rest/tests/integration/targets \
ANSIBLE_COLLECTIONS_PATH=~/.ansible/collections/ansible_collections \
./tests/integration/run_eco_vcenter_ci.sh