automated-typo3-update/.gitlab-ci.yml
Daniel Siepmann a0e83ebef0
TASK: Add checks for documentation
* Check for syntax issues.
* Check for link integrity.
2017-04-13 09:17:08 +02:00

104 lines
2.1 KiB
YAML

before_script:
- apk add --no-cache make wget git
- make install-composer
- make install
- mkdir -p result
stages:
- sync
- test
- render
sync:github:
image: 'bash:latest'
stage: sync
before_script:
- apk add --no-cache openssh-client git
# SSH deploy key
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" > /tmp/private_key
- chmod go-rwx /tmp/private_key; chmod u-x /tmp/private_key
- ssh-add /tmp/private_key
- mkdir -p ~/.ssh
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
script:
- git clone --mirror ${CI_REPOSITORY_URL} mirror
- cd mirror
- git push --mirror ${MIRROR_GIT_URL}
lint:coding-guideline:
image: php:7.0-alpine
stage: test
script:
- ./vendor/bin/phpcs -s -n
- ./vendor/bin/phpcs -s -n > result/phpcs-summary.txt
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
test:5.6:
image: php:5.6-alpine
stage: test
script:
- ./vendor/bin/phpunit
test:7.0:
image: php:7.0-alpine
stage: test
script:
- ./vendor/bin/phpunit
test:latest:
image: php:7-alpine
stage: test
script:
- ./vendor/bin/phpunit
test:documentation:syntax:
image: 'danielsiepmann/sphinx:latest'
stage: test
before_script:
- cd Documentation
script:
- make dummy
artifacts:
when: on_failure
artifacts:
paths:
- Documentation/build/dummy
test:documentation:external-links:
image: 'danielsiepmann/sphinx:latest'
stage: test
before_script:
- cd Documentation
script:
- make linkcheck
artifacts:
when: on_failure
artifacts:
paths:
- Documentation/build/linkcheck/output.txt
render:documentation:
image: 'danielsiepmann/sphinx:latest'
stage: render
before_script:
- cd Documentation
script:
- make html
artifacts:
paths:
- Documentation/build/html