.gitlab-ci.yml 1.73 KB
Newer Older
Erick Hitter's avatar
Erick Hitter committed
1
2
3
4
5
6
7
8
9
10
11
12
variables:
  # Configure mysql service (https://hub.docker.com/_/mysql/)
  MYSQL_DATABASE: wordpress_tests
  MYSQL_ROOT_PASSWORD: mysql

before_script:
  # Install dependencies

  # update the docker
  - apt-get clean
  - apt-get -yqq update

Erick Hitter's avatar
Erick Hitter committed
13
14
  # install the required packages for the running CI tests
  - apt-get -yqqf install zip unzip subversion mysql-client default-libmysqlclient-dev --fix-missing
Erick Hitter's avatar
Erick Hitter committed
15
16

  # PHP extensions
Erick Hitter's avatar
Erick Hitter committed
17
  - docker-php-ext-install mbstring mcrypt mysqli pdo_mysql intl gd zip bz2
Erick Hitter's avatar
Erick Hitter committed
18
19
  - docker-php-ext-enable mbstring mcrypt mysqli pdo_mysql intl gd zip bz2

20
21
22
  # Install Composer
  - curl -sS https://getcomposer.org/installer | php

Erick Hitter's avatar
Erick Hitter committed
23
24
25
  # Set up WordPress tests
  - bash bin/install-wp-tests.sh wordpress_tests root mysql mysql latest true

Erick Hitter's avatar
Erick Hitter committed
26
27
28
  # PHPUnit for most builds
  - php composer.phar global require "phpunit/phpunit=6.1.*"

Erick Hitter's avatar
Erick Hitter committed
29
  # Install PHPCS and WPCS
Erick Hitter's avatar
Erick Hitter committed
30
  - php composer.phar global require automattic/vipwpcs
Erick Hitter's avatar
Erick Hitter committed
31
32
33
34
35
36
37
  - phpcs --config-set installed_paths $HOME/.composer/vendor/wp-coding-standards/wpcs,$HOME/.composer/vendor/automattic/vipwpcs

PHPunit:PHP5.3:MySQL:
  image: tetraweb/php:5.3
  services:
    - mysql:5.6
  script:
Erick Hitter's avatar
Erick Hitter committed
38
    - php composer.phar global require "phpunit/phpunit=4.8.*"
39
40
    - phpcs
    - phpunit
Erick Hitter's avatar
Erick Hitter committed
41
  allow_failure: true
Erick Hitter's avatar
Erick Hitter committed
42
43

PHPunit:PHP5.6:MySQL:
Erick Hitter's avatar
Erick Hitter committed
44
  image: php:5.6-stretch
Erick Hitter's avatar
Erick Hitter committed
45
46
47
  services:
    - mysql:5.6
  script:
Erick Hitter's avatar
Erick Hitter committed
48
    - php composer.phar global require "phpunit/phpunit=4.8.*"
49
50
    - phpcs
    - phpunit
Erick Hitter's avatar
Erick Hitter committed
51
52

PHPunit:PHP7.0:MySQL:
Erick Hitter's avatar
Erick Hitter committed
53
  image: php:7.0-stretch
Erick Hitter's avatar
Erick Hitter committed
54
55
56
  services:
    - mysql:5.6
  script:
57
58
    - phpcs
    - phpunit
Erick Hitter's avatar
Erick Hitter committed
59
60

PHPunit:PHP7.1:MySQL:
Erick Hitter's avatar
Erick Hitter committed
61
  image: php:7.1-stretch
Erick Hitter's avatar
Erick Hitter committed
62
63
64
  services:
    - mysql:5.6
  script:
65
66
    - phpcs
    - phpunit
Erick Hitter's avatar
Erick Hitter committed
67
68

PHPunit:PHP7.2:MySQL:
Erick Hitter's avatar
Erick Hitter committed
69
  image: php:7.2-stretch
Erick Hitter's avatar
Erick Hitter committed
70
71
72
  services:
    - mysql:5.6
  script:
73
74
    - phpcs
    - phpunit