Skip to content

Commit 1a08091

Browse files
authored
Merge pull request #338 from ernilambar/239-update-gitlab-ci
Update GitLab CI config file
2 parents dd56e0b + 4c61ea6 commit 1a08091

File tree

1 file changed

+27
-34
lines changed

1 file changed

+27
-34
lines changed

templates/plugin-gitlab.mustache

Lines changed: 27 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -6,62 +6,55 @@ variables:
66
before_script:
77
# Install dependencies
88

9-
# update the docker
10-
- apt-get clean
9+
# Update the docker
1110
- apt-get -yqq update
12-
13-
# instll the required packages for the running CI tests
1411
- apt-get -yqqf install zip unzip subversion default-mysql-client default-libmysqlclient-dev --fix-missing
1512

1613
# PHP extensions
17-
- docker-php-ext-enable mbstring mcrypt mysqli pdo_mysql intl gd zip bz2
14+
- docker-php-ext-install -j$(nproc) mysqli pdo_mysql
1815

19-
# Set up WordPress tests
16+
# Setup WordPress tests
2017
- bash bin/install-wp-tests.sh wordpress_tests root mysql mysql latest true
2118

19+
# Install Composer
20+
- php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
21+
- php composer-setup.php --install-dir=/usr/local/bin --filename=composer
22+
- php -r "unlink('composer-setup.php');"
23+
- export PATH="$PATH:$HOME/.composer/vendor/bin"
24+
25+
# Install PHPUnit
26+
- PHPUNIT_VERSION=9.6.19
27+
- curl -o /usr/local/bin/phpunit "https://phar.phpunit.de/phpunit-${PHPUNIT_VERSION}.phar" && chmod +x /usr/local/bin/phpunit
28+
- composer global require yoast/phpunit-polyfills
29+
- export WP_TESTS_PHPUNIT_POLYFILLS_PATH="$HOME/.composer/vendor/yoast/phpunit-polyfills"
30+
- phpunit --version
31+
2232
# Install PHPCS and WPCS
23-
- composer global require "squizlabs/php_codesniffer=*"
33+
- composer global config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
2434
- composer global require "wp-coding-standards/wpcs"
2535
- composer global require "phpcompatibility/phpcompatibility-wp"
26-
- vendor="$HOME/.composer/vendor"
27-
- phpcs --config-set installed_paths "$vendor/wp-coding-standards/wpcs,$vendor/phpcompatibility/php-compatibility,$vendor/phpcompatibility/phpcompatibility-paragonie,$vendor/phpcompatibility/phpcompatibility-wp"
28-
29-
PHPunit:PHP5.3:MySQL:
30-
image: tetraweb/php:5.3
31-
services:
32-
- mysql:5.6
33-
script:
34-
- phpcs
35-
- phpunit
36-
37-
PHPunit:PHP5.6:MySQL:
38-
image: tetraweb/php:5.6
39-
services:
40-
- mysql:5.6
41-
script:
42-
- phpcs
43-
- phpunit
36+
- phpcs --version
4437

45-
PHPunit:PHP7.0:MySQL:
46-
image: tetraweb/php:7.0
38+
PHPunit:PHP7.4:MySQL:
39+
image: php:7.4-bullseye
4740
services:
48-
- mysql:5.6
41+
- mysql:5.7
4942
script:
5043
- phpcs
5144
- phpunit
5245

53-
PHPunit:PHP7.1:MySQL:
54-
image: tetraweb/php:7.1
46+
PHPunit:PHP8.0:MySQL:
47+
image: php:8.0-bullseye
5548
services:
56-
- mysql:5.6
49+
- mysql:5.7
5750
script:
5851
- phpcs
5952
- phpunit
6053

61-
PHPunit:PHP7.2:MySQL:
62-
image: tetraweb/php:7.2
54+
PHPunit:PHP8.2:MySQL:
55+
image: php:8.2-bullseye
6356
services:
64-
- mysql:5.6
57+
- mysql:5.7
6558
script:
6659
- phpcs
6760
- phpunit

0 commit comments

Comments
 (0)