-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pcit.yml
117 lines (102 loc) · 2.48 KB
/
.pcit.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
#
# @see https://github.com/khs1994-php/pcit/blob/master/docs/SUMMARY.md
#
languages: php
# cache:
# directories:
# - cache
workspace:
base: /app
# path: .
path: src
pipeline:
# install dep
install:
image: composer:${COMPOSER_VERSION}
shell: bash
commands:
- pwd
- composer config -g repo.packagist composer https://packagist.laravel-china.org
# 由于 composer 镜像缺少某些扩展,故忽略这些
- composer install -q --ignore-platform-reqs
# - composer update -q --ignore-platform-reqs
# test script
script:
image: khs1994/php:${PHP_VERSION}-fpm-alpine
pull: true
shell: bash
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=coverage.xml
when:
# platform: linux/amd64
# platform: [ linux/*, windows/amd64 ]
# status: changed
# status: [ failure, success ]
# event: tag
# event: [push, pull_request, tag, deployment]
event: [push, pull_request, tag]
# branch: master
# branch: prefix/*
# branch: [master, develop]
# branch:
# include: [ master, release/* ]
# exclude: [ release/1.0.0, release/1.1.* ]
# when tag push build docker image
publish_php:
image: ci_docker_build
# registry: docker.khs1994.com
repo: khs1994/php
tags: ${PHP_VERSION}-swarm-${CI_TAG}-alpine
# target: php
build_args:
- a:1
# dockerfile: Dockerfile
# dockerfile: path/to/Dockerfile
when:
event: tag
after_success:
image: khs1994/php:${PHP_VERSION}-fpm-alpine
shell: bash
when:
status: success
commands:
# please set env CODECOV_TOKEN=XXX
- bash <(curl -s https://codecov.io/bash)
after_failure:
image: bash
when:
status: failure
commands:
- echo "build failure"
changed:
image: bash
when:
status: changed
commands:
- echo "build status changed"
matrix:
COMPOSER_VERSION:
- 1.7.2
PHP_VERSION:
- 7.2.11
- 7.1.23
# - 7.0.32
# - 5.6.38
NGINX_VERSION:
- 1.15.5
REDIS_VERSION:
- 5.0-rc5
MYSQL_VERSION:
# - 8.0.11
- 5.7.22
MONGODB_VERSION:
- 3.7.3
POSTGRESQL_VERSION:
- 10.3-alpine
# branches:
# include: [ master, dev, feature/* ]
# exclude: [ release/1.0.0, release/1.1.* ]