-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
50 lines (42 loc) · 1.09 KB
/
.gitlab-ci.yml
File metadata and controls
50 lines (42 loc) · 1.09 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
### GENERAL ###
variables:
PHP_VERSION: '8.4'
image: php:${PHP_VERSION}-cli-alpine
cache:
key: ${CI_COMMIT_REF_SLUG}-${PHP_VERSION}
paths:
- vendor/
stages:
- lint
- test
before_script:
- apk add --no-cache curl git unzip bash python3
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- composer install
### JOBS ###
job_lint_app:
stage: lint
image: php:${PHP_VERSION}-cli-alpine
parallel:
matrix:
- PHP_VERSION: ['8.3', '8.4', '8.5']
script:
- composer require --dev friendsofphp/php-cs-fixer:^3.0 php-parallel-lint/php-parallel-lint:^1.0
- vendor/bin/php-cs-fixer -vvv fix . --dry-run --diff --using-cache=no --rules=@PSR2
- vendor/bin/parallel-lint --exclude vendor .
rules:
- if: $PHP_VERSION == "8.5"
allow_failure: true
- when: always
job_test_app:
stage: test
image: php:${PHP_VERSION}-cli-alpine
parallel:
matrix:
- PHP_VERSION: ['8.3', '8.4', '8.5']
script:
- composer test
rules:
- if: $PHP_VERSION == "8.5"
allow_failure: true
- when: always