3 Star 2 Fork 0

khs1994-docker / php-demo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
.travis.yml 3.19 KB
一键复制 编辑 原始数据 按行查看 历史
khs1994 提交于 2018-09-11 16:21 . Update travis ci
#
# Travis CI
#
# @link https://docs.travis-ci.com/
# @link https://www.khs1994.com/categories/CI/Travis-CI/
#
language: php
# cache:
# directories:
# - cache
sudo: required
# services:
# - docker
# - rabbitmq
# - memcached
# - redis-server
# - mysql
# - mariadb
# - postgresql
# - mongodb
php:
# - 5.6
# - 7.0
# - 7.1
- 7.2
# - 7.3 # not support
# - nightly # 7.4
matrix:
fast_finish: true
# allow_failures:
# - php: nightly
# - php: 7.3
# - env: KEY=VALUE
#
# 设置数据库
#
# @link https://docs.travis-ci.com/user/database-setup/
#
# addons:
# mariadb: '10.0'
# postgresql: '9.4'
before_install:
# update docker version
# - docker --version
# - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) test"
# - sudo apt-get update
# - sudo apt-get -y install docker-ce
# - docker --version
# - sleep 15
- sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'DROP DATABASE IF EXISTS tests;' -U postgres; fi"
- sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'DROP DATABASE IF EXISTS tests_tmp;' -U postgres; fi"
- sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'CREATE DATABASE tests;' -U postgres; fi"
- sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'CREATE DATABASE tests_tmp;' -U postgres; fi"
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE IF NOT EXISTS tests_tmp; CREATE DATABASE IF NOT EXISTS tests;'; fi"
- sh -c "if [ '$ENABLE_MONGODB' = 'enable' ]; then mongo mydb_test --eval 'db.createUser({user:"travis",pwd:"test",roles:["readWrite"]});'; fi"
- php .khsci.php
jobs:
include:
- stage: test
install:
- composer install -q
# - composer update -q
- composer require illuminate/console
- curl -fsSL http://get.sensiolabs.org/sami.phar -o sami
- chmod +x sami
script:
# - phpenv config-rm xdebug.ini || echo "xdebug not available"
- vendor/bin/phpunit --coverage-clover=coverage.xml
# after_success:
# - bash <(curl -s https://codecov.io/bash)
# - ./sami update .sami.php
# - stage: deploy
# script: " if ! [ -z \"${TRAVIS_TAG}\" ];then
# echo \"${TRAVIS_TAG}\" ;
# docker build -t khs1994/php-fpm:swarm-7.2.0-alpine3.7-${TRAVIS_TAG} --target=php . ;
# docker build -t khs1994/nginx:swarm-1.13.0-alpine-${TRAVIS_TAG} . ;
# docker login -u ${DOCKER_USERNAME} -p ${DOCKER_PASSWORD} ;
# docker push khs1994/php-fpm:swarm-7.2.0-alpine3.7-${TRAVIS_TAG} ;
# docker push khs1994/nginx:swarm-1.13.0-alpine-${TRAVIS_TAG} ;
# else
# echo \"NOT TAG, Don't Build\";
# fi "
stages:
- test
# - name: deploy
# if: tag =~ ^[0-9.]+$
env:
global:
- MONGODB=disable
# - DB=sqlite
# - DB=mysql
# - DB=postgresql
#
# rabbitmq vhost / username guest password guest
#
#
# mysql 127.0.0.1 username-> root/travis 空密码
#
# memcached/redis -> localhost
#
# deploy:
# provider: pages
# skip-cleanup: true
# local-dir: build
# github-token: $GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable
# keep-history: true
# on:
# branch: master
PHP
1
https://gitee.com/khs1994-docker/php-demo.git
git@gitee.com:khs1994-docker/php-demo.git
khs1994-docker
php-demo
php-demo
master

搜索帮助