2017-04-11 18:23:09 +02:00
|
|
|
image: 'bash:latest'
|
|
|
|
|
2017-04-08 22:49:00 +02:00
|
|
|
before_script:
|
2017-04-08 23:32:11 +02:00
|
|
|
- apk add --no-cache make wget git
|
2017-04-08 23:23:09 +02:00
|
|
|
- make install-composer
|
2017-04-08 23:07:26 +02:00
|
|
|
- make install
|
2017-04-09 00:10:22 +02:00
|
|
|
- mkdir -p result
|
2017-04-08 22:49:00 +02:00
|
|
|
|
|
|
|
stages:
|
2017-04-11 15:49:01 +02:00
|
|
|
- sync
|
2017-04-08 22:49:00 +02:00
|
|
|
- test
|
|
|
|
|
2017-04-11 15:49:01 +02:00
|
|
|
sync:github:
|
|
|
|
stage: sync
|
|
|
|
before_script:
|
2017-04-11 18:23:09 +02:00
|
|
|
- apk add --no-cache openssh-client git
|
2017-04-11 15:49:01 +02:00
|
|
|
# SSH deploy key
|
|
|
|
- eval $(ssh-agent -s)
|
2017-04-11 20:21:20 +02:00
|
|
|
- ssh-add <(echo "${SSH_PRIVATE_KEY}")
|
2017-04-11 15:49:01 +02:00
|
|
|
- mkdir -p ~/.ssh
|
|
|
|
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
|
|
|
|
script:
|
2017-04-11 15:54:18 +02:00
|
|
|
- git clone --mirror ${CI_REPOSITORY_URL} mirror
|
|
|
|
- cd mirror
|
|
|
|
- git push --mirror ${MIRROR_GIT_URL}
|
2017-04-11 15:49:01 +02:00
|
|
|
|
2017-04-09 00:10:22 +02:00
|
|
|
lint:coding-guideline:
|
|
|
|
image: php:7.0-alpine
|
|
|
|
stage: test
|
|
|
|
script:
|
2017-04-10 09:32:22 +02:00
|
|
|
- ./vendor/bin/phpcs -s -n
|
|
|
|
- ./vendor/bin/phpcs -s -n > result/phpcs-summary.txt
|
2017-04-09 00:10:22 +02:00
|
|
|
artifacts:
|
|
|
|
when: on_failure
|
|
|
|
paths:
|
|
|
|
- result
|
|
|
|
|
|
|
|
lint:php-mass-detection:
|
|
|
|
image: php:7.0-alpine
|
|
|
|
stage: test
|
|
|
|
script:
|
|
|
|
- ./vendor/bin/phpmd src text phpmd.xml > result/phpmd.txt
|
|
|
|
- ./vendor/bin/phpmd src html phpmd.xml > result/phpmd.html
|
|
|
|
artifacts:
|
|
|
|
when: on_failure
|
|
|
|
paths:
|
|
|
|
- result
|
|
|
|
|
2017-04-08 23:23:09 +02:00
|
|
|
test:5.6:
|
2017-04-08 23:32:11 +02:00
|
|
|
image: php:5.6-alpine
|
2017-04-08 23:23:09 +02:00
|
|
|
stage: test
|
|
|
|
script:
|
|
|
|
- ./vendor/bin/phpunit
|
|
|
|
|
|
|
|
test:7.0:
|
2017-04-08 23:32:11 +02:00
|
|
|
image: php:7.0-alpine
|
2017-04-08 22:49:00 +02:00
|
|
|
stage: test
|
|
|
|
script:
|
|
|
|
- ./vendor/bin/phpunit
|
|
|
|
|
2017-04-09 00:10:22 +02:00
|
|
|
test:latest:
|
|
|
|
image: php:7-alpine
|
|
|
|
stage: test
|
|
|
|
script:
|
|
|
|
- ./vendor/bin/phpunit
|
|
|
|
|
2017-04-08 22:49:00 +02:00
|
|
|
# Further stages, and jobs e.g. linting, cgl, etc.
|