-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTaskfile.yml
64 lines (55 loc) · 1.18 KB
/
Taskfile.yml
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# yaml-language-server: $schema=https://taskfile.dev/schema.json
---
version: "3"
set:
- pipefail
silent: true
tasks:
default:
desc: Show help
silent: true
cmds:
- task --list --color
venv:
desc: Create python3 virtual environment
preconditions:
- test -f $(which python3)
cmds:
- $(which python3) -m venv venv
- ./venv/bin/python -m pip install --upgrade pip
install:pip:
desc: Install python requirements
deps:
- venv
preconditions:
- test -d ./venv
- test -f requirements.txt
cmds:
- ./venv/bin/pip install -r requirements.txt
anslint:
desc: Run ansible-lint
deps:
- install:pip
preconditions:
- test -f ./venv/bin/ansible-lint
cmds:
- ./venv/bin/ansible-lint --force-color .
ymllint:
desc: Run yamllint
deps:
- install:pip
preconditions:
- test -f ./venv/bin/yamllint
cmds:
- ./venv/bin/yamllint --format auto --strict .
lint:
desc: Run all linters
cmds:
- task: ymllint
- task: anslint
test:
desc: Run test for this role
deps:
- lint
cmds:
- echo "Oooops... Need to implement!"