-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
148 lines (144 loc) · 3.99 KB
/
Taskfile.yml
File metadata and controls
148 lines (144 loc) · 3.99 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
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
version: '1'
name: redsl
description: Minimal Taskfile
variables:
APP_NAME: redsl
environments:
local:
container_runtime: docker
compose_command: docker compose
pipeline:
python_version: "3.12"
runner_image: ubuntu-latest
branches: [main]
cache: [~/.cache/pip]
artifacts: [dist/]
stages:
- name: lint
tasks: [lint]
- name: test
tasks: [test]
- name: build
tasks: [build]
when: "branch:main"
tasks:
install:
desc: Install Python dependencies (editable)
cmds:
- pip install -e .[dev]
test:
desc: Run pytest suite
cmds:
- pytest -q
lint:
desc: Run ruff lint check
cmds:
- ruff check .
fmt:
desc: Auto-format with ruff
cmds:
- ruff format .
build:
desc: Build wheel + sdist
cmds:
- python -m build
clean:
desc: Remove build artefacts
cmds:
- rm -rf build/ dist/ *.egg-info
up:
desc: Start services via docker compose
cmds:
- docker compose up -d
down:
desc: Stop services
cmds:
- docker compose down
logs:
desc: Tail compose logs
cmds:
- docker compose logs -f
ps:
desc: Show running compose services
cmds:
- docker compose ps
docker-build:
desc: Build docker image
cmds:
- docker build -t redsl:latest .
help:
desc: '[imported from Makefile] help'
cmds:
- "echo \"Dost\u0119pne komendy:\""
- "echo \" install - Instalacja zale\u017Cno\u015Bci produkcyjnych\""
- "echo \" dev-install - Instalacja zale\u017Cno\u015Bci deweloperskich\""
- "echo \" test - Uruchomienie test\xF3w pytest (bez slow)\""
- echo " test-fast - Szybkie testy (bez slow/integration/e2e)"
- "echo \" test-all - Wszystkie testy w\u0142\u0105cznie z slow\""
- echo " lint - Sprawdzenie lintingu ruff"
- "echo \" type-check - Sprawdzenie typ\xF3w mypy\""
- echo " format - Formatowanie kodu ruff"
- echo " format-check - Sprawdzenie formatowania kodu"
- "echo \" docker-up - Uruchomienie us\u0142ug Docker\""
- "echo \" docker-down - Zatrzymanie us\u0142ug Docker\""
- "echo \" docker-build - Budowanie obraz\xF3w Docker\""
- echo " run - Uruchomienie aplikacji w Docker"
- echo " run-local - Uruchomienie aplikacji lokalnie"
- "echo \" clean - Czyszczenie plik\xF3w tymczasowych\""
dev-install:
desc: '[imported from Makefile] dev-install'
cmds:
- $(PIP) install -r requirements.txt
- $(PIP) install -e ".[dev]"
test-fast:
desc: '[imported from Makefile] test-fast'
cmds:
- $(PYTHON) -m pytest tests/ -q -m "not slow and not integration and not e2e"
test-all:
desc: '[imported from Makefile] test-all'
cmds:
- $(PYTHON) -m pytest tests/ -v
type-check:
desc: '[imported from Makefile] type-check'
cmds:
- $(PYTHON) -m mypy redsl/
format:
desc: '[imported from Makefile] format'
cmds:
- $(PYTHON) -m ruff format redsl/ tests/
- $(PYTHON) -m ruff check --fix redsl/ tests/
format-check:
desc: '[imported from Makefile] format-check'
cmds:
- $(PYTHON) -m ruff format --check redsl/ tests/
docker-up:
desc: '[imported from Makefile] docker-up'
cmds:
- $(DOCKER_COMPOSE) up -d
docker-down:
desc: '[imported from Makefile] docker-down'
cmds:
- $(DOCKER_COMPOSE) down
run:
desc: '[imported from Makefile] run'
deps:
- docker-up
run-local:
desc: '[imported from Makefile] run-local'
cmds:
- $(PYTHON) -m uvicorn redsl.api:app --reload --host 0.0.0.0 --port 8000
health:
desc: '[from doql] workflow: health'
cmds:
- docker compose ps
- docker compose exec app echo "Health check passed"
import-makefile-hint:
desc: '[from doql] workflow: import-makefile-hint'
cmds:
- 'echo ''Run: taskfile import Makefile to import existing targets.'''
all:
desc: Run install, lint, test
cmds:
- taskfile run install
- taskfile run lint
- taskfile run test