首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Gitlab中的Wordpress CI

Gitlab中的Wordpress CI
EN

Stack Overflow用户
提问于 2016-06-22 05:54:19
回答 2查看 7.9K关注 0票数 4

是否有使用Gitlab实现(WP_UnitTestCase)的参考资料?

我已经尝试过配置.gitlab-ci.yml,它实现了构建,但是没有运行测试。

这是..gitlab ci.yml文件:

代码语言:javascript
复制
image: php:5.6

variables:
  # Configure mysql service (https://hub.docker.com/_/mysql/)
  MYSQL_DATABASE: wordpress_tests
  MYSQL_ROOT_PASSWORD: mysql

before_script:
  # Install dependencies
  - bash ci/docker_install.sh wordpress_tests root mysql tutum-wordpress latest

stages:
  - test

# test:PHP5.3:MySQL:
#   image: tetraweb/php:5.3
#   script:
#   - phpunit --configuration phpunit.xml.dist

test:PHP5.4:MySQL:
  image: tetraweb/php:5.4
  services:
  - tutum/wordpress:latest
  script:
  - phpunit --configuration phpunit.xml.dist

# test:PHP5.6:MySQL:
#   image: php:5.6
#   script:
#   - phpunit --configuration phpunit.xml.dist

# test:PHP7:MySQL:
#   image: php:7
#   script:
#   - phpunit --configuration phpunit.xml.dist
EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2016-06-23 09:27:14

经过大量的尝试和错误之后,您可以看到PHP5.3到PHP7.0的测试正在为我创建的这里测试插件正常运行

这就是我的..gitlab ci.yml的样子。设置环境的shell脚本是这里

要在项目中使用这一点,只需将.gitlab-ci.ymlbin/install_gitlab_tests.sh复制到项目中即可。

票数 8
EN

Stack Overflow用户

发布于 2017-03-27 01:50:53

我也有过类似的问题。看起来这是wordpress与phpunit 6.0的兼容性问题。通过降粒装置固定到5.6。请参阅:https://github.com/wp-cli/wp-cli/issues/3802

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/37959631

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档