forked from Darkjeff/ultimateimmo
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
53 lines (47 loc) · 1.53 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
cache:
paths:
- vendor/
before_script:
- curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
- echo -e "deb http://deb.debian.org/debian jessie main\ndeb http://security.debian.org jessie/updates main" > /etc/apt/sources.list
- apt-get update -yqq
- apt-get install -yqq zip
stages:
- test
- build
- deploy
code_syntax:
image: tetraweb/php:7.1
stage: test
script:
- docker-php-ext-enable zip
- echo "Composer installation"
- composer self-update
- composer --version
- echo "Checking tools installation"
- composer require jakub-onderka/php-parallel-lint
- echo "Testing for errors in code"
- vendor/bin/parallel-lint -V
- vendor/bin/parallel-lint --exclude vendor/ --blame .
allow_failure: true
code_quality:
image: tetraweb/php:7.1
stage: test
script:
- docker-php-ext-enable zip
- mkdir -p vendor/phpcs
- curl https://raw.githubusercontent.com/Dolibarr/dolibarr/develop/dev/setup/codesniffer/ruleset.dtd > vendor/phpcs/ruleset.dtd
- curl https://raw.githubusercontent.com/Dolibarr/dolibarr/develop/dev/setup/codesniffer/ruleset.xml > vendor/phpcs/ruleset.xml
- echo "Testing code quality"
- phpcs --version
- phpcs -s -n -p -d memory_limit=-1 --colors --tab-width=4 --ignore=vendor/,doc/,lib/ --standard=vendor/phpcs/ruleset.xml --encoding=utf-8 --report=full,summary .
allow_failure: true
build_module:
image: tetraweb/php:7.1
stage: build
script:
- echo "Building module"
- bash ci.sh
artifacts:
paths:
- module*.zip