-
Notifications
You must be signed in to change notification settings - Fork 53
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
50 lines (44 loc) · 1.46 KB
/
.gitlab-ci.yml
File metadata and controls
50 lines (44 loc) · 1.46 KB
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
################
# GitLab CI configuration for Coder project
################
variables:
COMPOSER_HOME: "$CI_PROJECT_DIR/.composer"
.test-template:
image: php:$PHP_VERSION-alpine
before_script:
- apk add --no-cache git unzip
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- composer install --no-progress --prefer-dist --optimize-autoloader
script:
- ./vendor/bin/phpunit
- ./vendor/bin/phpcs
- ./vendor/bin/phpcs -p --standard=tests/Drupal/phpcs-ruleset.xml tests/Drupal/good/ --ignore=tests/Drupal/good/GoodUnitTest.php
- ./vendor/bin/phpcs -p --standard=coder_sniffer/DrupalPractice tests/DrupalPractice/good/ --ignore=tests/DrupalPractice/good/GoodUnitTest.php
# PHP 7.4 - 8.4 tests
test:php:
extends: .test-template
parallel:
matrix:
- PHP_VERSION: ["7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"]
# PHPStan analysis
phpstan:
extends: .test-template
variables:
PHP_VERSION: "8.4"
script:
- ./vendor/bin/phpstan analyse --memory-limit=256M
# Cspell spell checking
cspell:
image: node:alpine
script:
- npm install -g cspell
- cspell "**/*"
# Drupal core regression tests
drupal-core:
extends: .test-template
variables:
PHP_VERSION: "8.4"
script:
- git clone --depth 1 --branch 11.x https://git.drupalcode.org/project/drupal.git drupal
- cd drupal/core
- ../../vendor/bin/phpcs -p -s --parallel=$(nproc) -d memory_limit=2G