Skip to content

Commit ae2cfb8

Browse files
turegjorupclaude
andcommitted
6654: Add Taskfile for local development workflow
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b1d3167 commit ae2cfb8

1 file changed

Lines changed: 181 additions & 0 deletions

File tree

Taskfile.yml

Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
# yaml-language-server: $schema=https://taskfile.dev/schema.json
2+
---
3+
version: "3"
4+
5+
# https://taskfile.dev/usage/#env-files
6+
dotenv: [".env.local", ".env"]
7+
8+
vars:
9+
# https://taskfile.dev/reference/templating/
10+
DOCKER_COMPOSE: '{{.TASK_DOCKER_COMPOSE | default "docker compose"}}'
11+
12+
tasks:
13+
site:update:
14+
desc: Update/install site
15+
cmds:
16+
- task: compose
17+
vars:
18+
COMPOSE_ARGS: pull
19+
- task: compose
20+
vars:
21+
COMPOSE_ARGS: up --detach --wait
22+
- task: composer
23+
vars:
24+
COMPOSER_ARGS: install
25+
26+
site:migrate:
27+
desc: Run database migrations
28+
cmds:
29+
- task: console
30+
vars:
31+
CONSOLE_ARGS: doctrine:migrations:migrate --no-interaction
32+
33+
fixtures:load:
34+
desc: Load fixtures
35+
prompt: Really load all fixtures?
36+
cmds:
37+
- task: console
38+
vars:
39+
CONSOLE_ARGS: hautelook:fixtures:load --no-interaction
40+
41+
tests:
42+
desc: Run tests
43+
cmds:
44+
- task: console
45+
vars:
46+
CONSOLE_ARGS: --env=test doctrine:database:drop --if-exists --force --quiet
47+
- task: console
48+
vars:
49+
CONSOLE_ARGS: --env=test doctrine:database:create --no-interaction --if-not-exists --quiet
50+
- task: console
51+
vars:
52+
CONSOLE_ARGS: --env=test doctrine:migrations:migrate --no-interaction --quiet
53+
- task: compose
54+
vars:
55+
COMPOSE_ARGS: exec phpfpm vendor/bin/phpunit --stop-on-failure
56+
57+
queues:
58+
desc: Consume async messenger queue
59+
cmds:
60+
- task: console
61+
vars:
62+
CONSOLE_ARGS: messenger:consume async --failure-limit=1 -vvv
63+
64+
composer:
65+
desc: "Run `composer` command. Example: task composer -- normalize"
66+
cmds:
67+
- task: compose
68+
vars:
69+
COMPOSE_ARGS: exec phpfpm composer {{.COMPOSER_ARGS}}
70+
71+
compose:
72+
desc: "Run `docker compose` command. Example: task compose -- ps"
73+
cmds:
74+
- "{{.DOCKER_COMPOSE}} {{.COMPOSE_ARGS}} {{.CLI_ARGS}}"
75+
76+
console:
77+
desc: "Run Symfony console command. Example: task console -- cache:clear"
78+
cmds:
79+
- task: compose
80+
vars:
81+
COMPOSE_ARGS: exec phpfpm bin/console {{.CONSOLE_ARGS}}
82+
83+
coding-standards:apply:
84+
desc: Apply coding standards
85+
cmds:
86+
- task: coding-standards:markdown:apply
87+
- task: coding-standards:php:apply
88+
- task: coding-standards:twig:apply
89+
- task: coding-standards:yaml:apply
90+
silent: true
91+
92+
coding-standards:check:
93+
desc: Check coding standards
94+
cmds:
95+
- task: coding-standards:markdown:check
96+
- task: coding-standards:php:check
97+
- task: coding-standards:twig:check
98+
- task: coding-standards:yaml:check
99+
silent: true
100+
101+
coding-standards:markdown:apply:
102+
desc: Apply coding standards for Markdown
103+
cmds:
104+
- task: compose
105+
vars:
106+
COMPOSE_ARGS: run --rm markdownlint markdownlint '**/*.md' --fix
107+
108+
coding-standards:markdown:check:
109+
desc: Check coding standards for Markdown
110+
cmds:
111+
- task: coding-standards:markdown:apply
112+
- task: compose
113+
vars:
114+
COMPOSE_ARGS: run --rm markdownlint markdownlint '**/*.md'
115+
116+
coding-standards:php:apply:
117+
desc: Apply coding standards for PHP
118+
cmds:
119+
- task: compose
120+
vars:
121+
COMPOSE_ARGS: exec phpfpm vendor/bin/php-cs-fixer fix
122+
silent: true
123+
124+
coding-standards:php:check:
125+
desc: Check coding standards for PHP
126+
cmds:
127+
- task: coding-standards:php:apply
128+
- task: compose
129+
vars:
130+
COMPOSE_ARGS: exec phpfpm vendor/bin/php-cs-fixer check
131+
silent: true
132+
133+
coding-standards:twig:apply:
134+
desc: Apply coding standards for Twig
135+
cmds:
136+
- task: compose
137+
vars:
138+
COMPOSE_ARGS: exec phpfpm vendor/bin/twig-cs-fixer lint --fix
139+
silent: true
140+
141+
coding-standards:twig:check:
142+
desc: Check coding standards for Twig
143+
cmds:
144+
- task: coding-standards:twig:apply
145+
- task: compose
146+
vars:
147+
COMPOSE_ARGS: exec phpfpm vendor/bin/twig-cs-fixer lint
148+
silent: true
149+
150+
coding-standards:yaml:apply:
151+
desc: Apply coding standards for YAML
152+
cmds:
153+
- task: compose
154+
vars:
155+
COMPOSE_ARGS: run --rm prettier '**/*.{yml,yaml}' --write --no-error-on-unmatched-pattern
156+
silent: true
157+
158+
coding-standards:yaml:check:
159+
desc: Check coding standards for YAML
160+
cmds:
161+
- task: coding-standards:yaml:apply
162+
- task: compose
163+
vars:
164+
COMPOSE_ARGS: run --rm prettier '**/*.{yml,yaml}' --check --no-error-on-unmatched-pattern
165+
silent: true
166+
167+
api:spec:export:
168+
desc: Export API specification
169+
cmds:
170+
- task: console
171+
vars:
172+
CONSOLE_ARGS: api:openapi:export --output=public/api-spec-v1.yaml --yaml --no-interaction
173+
- task: console
174+
vars:
175+
CONSOLE_ARGS: api:openapi:export --output=public/api-spec-v1.json --no-interaction
176+
silent: true
177+
178+
default:
179+
cmds:
180+
- task --list
181+
silent: true

0 commit comments

Comments
 (0)