-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTaskfile.yml
More file actions
134 lines (130 loc) · 3.01 KB
/
Copy pathTaskfile.yml
File metadata and controls
134 lines (130 loc) · 3.01 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
version: '1'
name: heal
description: Minimal Taskfile
variables:
APP_NAME: heal
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
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 heal:latest .
help:
desc: '[imported from Makefile] help'
cmds:
- echo "Available commands:"
- echo " install Install package"
- echo " install-dev Install package in development mode"
- echo " test Run tests"
- echo " lint Run linting"
- echo " format Format code"
- echo " clean Clean build artifacts"
- echo " build Build package"
- echo " publish Publish to PyPI"
install-dev:
desc: '[imported from Makefile] install-dev'
cmds:
- pip install -e .[dev]
test-cov:
desc: '[imported from Makefile] test-cov'
cmds:
- python -m pytest --cov=heal --cov-report=html --cov-report=term
lint:
desc: '[imported from Makefile] lint'
cmds:
- python -m flake8 heal/
- python -m mypy heal/
format:
desc: '[imported from Makefile] format'
cmds:
- python -m black heal/
- python -m isort heal/
publish:
desc: '[imported from Makefile] publish'
cmds:
- python -m twine upload dist/*
deps:
- build
publish-test:
desc: '[imported from Makefile] publish-test'
cmds:
- python -m twine upload --repository testpypi dist/*
deps:
- build
dev:
desc: '[imported from Makefile] dev'
cmds:
- pip install -e .[dev]
- pre-commit install
cli:
desc: '[imported from Makefile] cli'
cmds:
- heal --help
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
fmt:
desc: Auto-format with ruff
cmds:
- ruff format .