-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
.drone.yml
74 lines (68 loc) · 1.62 KB
/
.drone.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
name: CI
kind: pipeline
type: docker
steps:
- name: install
image: khs1994/php:7.4.0-composer-alpine
commands:
- pwd
- composer install
# - composer update
- name: script
pull: always
image: khs1994/php:7.4.0-fpm-alpine
environment:
CI_REDIS_HOST: redis
CI_REDIS_PORT: 6379
CI_MYSQL_HOST: mysql
CI_MYSQL_PORT: 3306
CI_MYSQL_USERNAME: root
CI_MYSQL_PASSWORD: test
CI_MYSQL_DATABASE: test
commands:
- pwd
- mv $${PHP_INI_DIR}/conf.d/docker-php-ext-xdebug.ini.default $${PHP_INI_DIR}/conf.d/docker-php-ext-xdebug.ini
- sleep 30
- vendor/bin/phpunit --coverage-clover=build/logs/clover.xml
# volumes:
# - /tmp:/tmp
# privileged: true
when:
branch: master
event: [push,pull_request,tag]
- name: codecov
image: plugins/codecov
settings:
# token: your-codecov-token
files:
- "clover.xml"
paths:
- build/logs
when:
status: success
environment:
CODECOV_TOKEN:
from_secret: codecov_token
- name: docker build
image: plugins/docker
settings:
registry: docker.khs1994.com
repo: pcit/pcit
tags: latest
when:
status: success
event: push
environemnt:
DOCKER_USERNAME:
from_secret: docker_username
DOCKER_PASSWORD:
from_secret: docker_password
services:
- name: mysql
image: mysql:5.7.29
environment:
MYSQL_DATABASE: test
MYSQL_ROOT_PASSWORD: test
- name: redis
image: redis:6.0.2-alpine
commands: ["--bind","0.0.0.0"]