-
-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy path.gitlab-ci.yml
175 lines (156 loc) · 4.9 KB
/
.gitlab-ci.yml
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
cache:
key: "$CI_JOB_STAGE-$CI_COMMIT_REF_NAME"
paths:
- .composer/
- .php_cs.cache
variables:
COMPOSER_CACHE_DIR: ".composer"
TYPO3_PATH_WEB: "$CI_PROJECT_DIR/.build/public"
MYSQL_DATABASE: "typo3"
MYSQL_ROOT_PASSWORD: "joh316"
typo3DatabaseName: "typo3"
typo3DatabaseHost: "mysql"
typo3DatabaseUsername: "root"
typo3DatabasePassword: "joh316"
before_script:
- apk add git --update
stages:
- lint
- test
- documentation
lint:cgl:
image: $CI_REGISTRY/containers/phpunit-with-php-8.2:main
stage: lint
before_script:
- composer remove typo3/cms-* --no-update
- composer install --no-progress --no-ansi --no-interaction
script:
- vendor/bin/php-cs-fixer fix --config=Build/.php-cs-fixer.dist.php -v --dry-run --using-cache=no --path-mode=intersection ./
- vendor/bin/typoscript-lint -c Build/typoscriptlint.yaml Configuration
lint:yaml:
stage: lint
image: python:alpine3.7
before_script:
- pip install yamllint==1.10.0
script:
- yamllint -c Build/yamllint.yaml Configuration/ Resources/
.lint_php: &lint_php
stage: lint
image: $CONTAINER_IMAGE
script:
- find *.php Classes Configuration Tests -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l
lint:php82:
<<: *lint_php
variables:
CONTAINER_IMAGE: php:8.2-alpine
lint:php83:
<<: *lint_php
variables:
CONTAINER_IMAGE: php:8.3-alpine
lint:php84:
<<: *lint_php
variables:
CONTAINER_IMAGE: php:8.4-alpine
phpstan:analyse:
image: $CI_REGISTRY/containers/phpunit-with-php-8.2:main
stage: lint
before_script:
- sed -i -e "s#ssh://[email protected]:22722#https://gitlab-ci-token:[email protected]#g" composer.json
- composer config platform.php 8.2
- composer install --no-progress --no-ansi --no-interaction
script:
- vendor/bin/phpstan analyse -c Build/phpstan.neon --memory-limit 256M
.test_php: &test_php
stage: test
services:
- mysql:5
image: $CONTAINER_IMAGE
only:
- branches
before_script:
- composer config --no-plugins allow-plugins.typo3/cms-composer-installers true
- composer config --no-plugins allow-plugins.typo3/class-alias-loader true
- composer require typo3/cms-core="${TYPO3_VERSION}"
script:
- vendor/bin/phpunit -c Build/UnitTests.xml
- typo3DatabaseDriver=pdo_sqlite vendor/bin/phpunit -c Build/FunctionalTests.xml
# Build in PHP 8.2 and TYPO3 13.4
test:php82:typo3_13:
<<: *test_php
variables:
CONTAINER_IMAGE: $CI_REGISTRY/containers/phpunit-with-php-8.2:main
TYPO3_VERSION: ^13.4
# Build in PHP 8.3 and TYPO3 13.4
test:php83:typo3_13:
<<: *test_php
variables:
CONTAINER_IMAGE: $CI_REGISTRY/containers/phpunit-with-php-8.3:main
TYPO3_VERSION: ^13.4
# Build in PHP 8.4 and TYPO3 13.4
test:php84:typo3_13:
<<: *test_php
variables:
CONTAINER_IMAGE: $CI_REGISTRY/containers/phpunit-with-php-8.4:main
TYPO3_VERSION: ^13.4
.test_codeception: &test_codeception
stage: test
image: $CONTAINER_IMAGE
only:
- branches
before_script:
- sed -i -e "s#ssh://[email protected]:22722#https://gitlab-ci-token:[email protected]#g" composer.json
- composer config --no-plugins allow-plugins.typo3/cms-composer-installers true
- composer config --no-plugins allow-plugins.typo3/class-alias-loader true
- composer require typo3/cms-core="${TYPO3_VERSION}"
script:
- mkdir -p .build/public/typo3temp/var/tests/acceptance-sqlite-dbs
- export typo3DatabaseDriver=pdo_sqlite
- export PROJECT_ROOT="$(pwd)"
- export INSTANCE_PATH="$(pwd)/.build/web/typo3temp/var/tests/acceptance"
- mkdir -p "$INSTANCE_PATH"
- mkdir -p "$PROJECT_ROOT/.build/web/typo3temp/var/tests/acceptance-logs/"
- vendor/bin/codecept run
artifacts:
paths:
- .build
expire_in: 1 day
when: always
# Build in PHP 8.2 and TYPO3 13.4
test:codception:php82:typo3_13:
<<: *test_codeception
variables:
CONTAINER_IMAGE: $CI_REGISTRY/containers/codeception-with-php-8.2:main
TYPO3_VERSION: ^13.4
GECKODRIVER_VERSION: v0.34.0
# Build in PHP 8.3 and TYPO3 13.4
test:codception:php83:typo3_13:
<<: *test_codeception
needs:
- test:codception:php82:typo3_13
variables:
CONTAINER_IMAGE: $CI_REGISTRY/containers/codeception-with-php-8.3:main
TYPO3_VERSION: ^13.4
GECKODRIVER_VERSION: v0.34.0
# Build in PHP 8.4 and TYPO3 13.4
test:codception:php84:typo3_13:
<<: *test_codeception
needs:
- test:codception:php83:typo3_13
variables:
CONTAINER_IMAGE: $CI_REGISTRY/containers/codeception-with-php-8.4:main
TYPO3_VERSION: ^13.4
GECKODRIVER_VERSION: v0.34.0
documentation:
stage: documentation
image:
name: ghcr.io/typo3-documentation/render-guides:latest
entrypoint: [ "" ]
script:
- mkdir -p Documentation-GENERATED-temp
- /opt/guides/entrypoint.sh --config=Documentation --no-progress --fail-on-log
before_script: []
artifacts:
paths:
- Documentation-GENERATED-temp/
expire_in: 1 day
when: always