-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtaskfile.yml
100 lines (85 loc) · 1.91 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
version: "3.0"
set: ['e', 'u', 'pipefail']
shopt: ['globstar']
dotenv: ['./app/.env']
env:
TLD: "{{.ROOT_DIR}}"
APP:
sh: echo "${APP_NAME:-meetup_bot}"
SCRIPT:
sh: "echo ${SCRIPT:-scheduler.sh}"
vars:
includes:
docker:
taskfile: ./taskfiles/docker.yml
heroku:
taskfile: ./taskfiles/heroku.yml
uv:
taskfile: ./taskfiles/uv.yml
tasks:
print:
- |
echo -e "TLD:\t\t$TLD"
echo -e "APP:\t\t{{.APP}}"
echo -e "BUILD:\t\t{{.BUILD}}"
echo -e "COMPOSE_FILE:\t{{.COMPOSE_FILE}}"
echo -e "DOCKERFILE:\t{{.DOCKERFILE}}"
echo -e "HEROKU_APP:\t{{.HEROKU_APP}}"
echo -e "PLATFORM:\t{{.PLATFORM}}"
echo -e "SCRIPT:\t\t{{.SCRIPT}}"
echo -e "REGISTRY:\t$REGISTRY"
echo -e "SERVICE:\t{{.SERVICE}}"
echo -e "TAG:\t\t${TAG}"
echo -e "USER_NAME:\t$USER_NAME"
echo -e "UNAME:\t\t$UNAME"
default:
desc: "Default task"
cmds:
- task --list
install:
desc: "Install project dependencies"
cmds:
- |
{{.INSTALL}} {{.CLI_ARGS}}
pre-commit:
desc: "Run pre-commit hooks"
cmds:
- pre-commit run --all-files
lint:
desc: "Run linters"
cmds:
- uv run ruff check --fix --respect-gitignore
format:
desc: "Run formatters"
cmds:
- uv run ruff format --respect-gitignore
test:
desc: "Run tests"
cmds:
- uv run pytest
deptry:
desc: "Run deptry"
cmds:
- uv run deptry {{.ROOT_DIR}}
pyclean:
desc: "Remove .pyc and __pycache__"
cmds:
- |
args=(
.
--debris
--verbose
-i .devbox
)
case "{{.CLI_ARGS}}" in
dry-run)
poetry run pyclean "${args[@]}" --dry-run
;;
*)
poetry run pyclean "${args[@]}"
;;
esac
checkbash:
desc: "Check bash scripts"
cmds:
- checkbashism -x {{.TLD}}/app/*.sh