-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
120 lines (99 loc) · 2.31 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
version: 2.6
silent: false
tasks:
up:
env:
USER_ID:
sh: id -u
GROUP_ID:
sh: id -g
cmds:
- docker-compose up -d --remove-orphans
status:
- docker-compose exec -T php echo ''
down:
cmds:
- docker-compose down
php:restart:
cmds:
- docker-compose restart php
php:server:
deps: [up]
cmds:
- docker-compose exec -d php php -S localhost:8080 -t api/web/
php:psalm:
deps: [ up ]
ignore_error: true
cmds:
- docker-compose exec php php vendor/bin/psalm
php:unit:
deps: [ up ]
cmds:
- docker-compose exec php php vendor/bin/phpunit
php:infection:
deps: [ up ]
cmds:
- docker-compose exec -e XDEBUG_MODE=coverage php php vendor/bin/roave-infection-static-analysis-plugin --only-covered
php:behat:
deps: [php:server, yii:migrate:fresh]
cmds:
- docker-compose exec php php vendor/bin/behat
php:test:
cmds:
- task: php:psalm
ignore_error: true
- task: php:unit
- task: php:infection
php:exec:
deps: [up]
cmds:
- docker-compose exec php {{.c}}
php:run:
cmds:
- docker-compose run --rm php {{.CLI_ARGS}}
yii:
cmds:
- task: php:run
vars:
CLI_ARGS: php ./yii {{if .CLI_ARGS}}{{.CLI_ARGS}}{{end}}
yii:migrate:
cmds:
- task: yii
vars:
c: migrate --interactive=0
yii:migrate:fresh:
cmds:
- task: yii
vars:
c: migrate:fresh --interactive=0
composer:i:
cmds:
- task: php:run
vars:
CLI_ARGS: composer install
composer:u:
cmds:
- task: php:run
vars:
CLI_ARGS: composer update {{if .CLI_ARGS}}{{.CLI_ARGS}}{{end}}
composer:r:
cmds:
- task: php:run
vars:
CLI_ARGS: composer require {{.CLI_ARGS}}
composer:rm:
cmds:
- task: php:run
vars:
CLI_ARGS: composer remove {{.CLI_ARGS}}
composer:yii-cfg:
cmds:
- task: php:run
vars:
CLI_ARGS: composer yii-config-rebuild
prod:u:
cmds:
- git pull
- docker-compose -f docker-compose.prod.yml pull php
- docker-compose -f docker-compose.prod.yml up -d --remove-orphans
- docker-compose -f docker-compose.prod.yml run --rm php ./yii migrate/up