Skip to content

Commit 87ea275

Browse files
authored
Add makefile for local linting (#369)
1 parent 99c3884 commit 87ea275

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -225,3 +225,8 @@ Please note that we have some actions bound to specific names of branches. So pl
225225
* `doc/` as a prefix for every branch that only changes documentation
226226

227227
For now we open pull requests against `main`. We are planning to introduce dedicated branches to support older versions without breaking changes. Since we don't need them for now, please check back with this section because when we decided on how to proceed, you will find the information here. For now `main` always has the newest changes and if you want a stable version, please use the newest release.
228+
229+
## Testing
230+
231+
Besides real tests that the developer should do before creating a PR, we built molecule scenarios to test the complete stack.
232+
In parallel, we check for ansible and yaml lint errors. To do this pro-actively, a `makefile` is included. You can use this by calling `make`.

makefile

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
ANSIBLE_LINTER = ansible-lint
2+
YAMLLINT = yamllint
3+
4+
.PHONY: all
5+
all: ansible-lint yamllint cleanup
6+
7+
.PHONY: ansible-lint
8+
ansible-lint:
9+
@echo "Running ansible-lint..."
10+
$(ANSIBLE_LINTER) ./roles/*
11+
12+
.PHONY: yamllint
13+
yamllint:
14+
@echo "Running yamllint..."
15+
$(YAMLLINT) .
16+
17+
.PHONY: cleanup
18+
cleanup:
19+
@echo "Cleaning up..."
20+
rm -rf .ansible

0 commit comments

Comments
 (0)