-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
63 lines (52 loc) · 1.21 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
image: registry.gitlab.tugraz.at/dbp/middleware/dbp-api/api-core-bundle/main:v1
before_script:
- 'git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.tugraz.at/".insteadOf "[email protected]:"'
variables:
COMPOSER_CACHE_DIR: "$CI_PROJECT_DIR/_composer_cache"
cache:
key: ${CI_PROJECT_PATH}
paths:
- _composer_cache
stages:
- test
.test_defaults: &test_defaults
script:
- sudo update-alternatives --set php "/usr/bin/${PHP}"
- composer install
- composer test
test-php7.3:
stage: test
variables:
PHP: "php7.3"
<<: *test_defaults
test-php7.4:
stage: test
variables:
PHP: "php7.4"
<<: *test_defaults
test-php8.0:
stage: test
variables:
PHP: "php8.0"
<<: *test_defaults
psalm:
stage: test
allow_failure: true
script:
- sudo update-alternatives --set php /usr/bin/php7.4
- composer install
- composer run psalm
phpstan:
stage: test
allow_failure: true
script:
- sudo update-alternatives --set php /usr/bin/php7.4
- composer install
- composer run phpstan
cs-fixer:
stage: test
allow_failure: true
script:
- sudo update-alternatives --set php /usr/bin/php7.4
- composer install
- composer run cs