-
Notifications
You must be signed in to change notification settings - Fork 643
/
taskctl.yaml
78 lines (65 loc) · 1.92 KB
/
taskctl.yaml
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
# This is a taskctl's tasks configuration file.
# More information at https://github.com/taskctl/taskctl
pipelines:
install:
- task: install:php
- task: install:node
depends_on: install:php
start:
- pipeline: install
- task: build:env
- task: docker:build
depends_on:
- build:env
- install
- task: docker:start
depends_on: docker:build
- task: banner
depends_on: docker:start
docker:tests:
- task: docker:start
- task: docker:tests:server
depends_on: docker:start
- task: docker:tests:run
depends_on: docker:start
tasks:
install:php:
command: composer install
install:node:
command: npm install
build:env:
command: cp .env.dist .env
heroku:compile:
command:
- cp deploy/heroku/.env .env
- php console/yii migrate/fresh
- php console/yii app/setup --interactive=0
env:
YII_ENV: heroku
local:build:
command:
- php console/yii app/setup
- npm run build
docker:build:
command:
- docker-compose run -T --rm app php console/yii app/setup --interactive=0
- docker-compose run -T --rm webpacker npm run build
docker:tests:run:
command:
- docker-compose exec -T db mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS \`yii2-starter-kit-test\` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
- docker-compose exec -T app ./vendor/bin/codecept build
- docker-compose exec -T app php tests/bin/yii app/setup --interactive=0
- docker-compose exec -T app vendor/bin/codecept run
- echo "Done!"
docker:tests:server:
command:
- docker-compose exec -T app php -S localhost:8080 -t /app
docker:start:
command:
- docker-compose up --force-recreate -d
docker:cleanup:
command:
- docker-compose rm -fsv
banner:
command:
- echo "Started! Visit http://yii2-starter-kit.localhost"