Skip to content
Snippets Groups Projects
Commit 19497218 authored by Daniel Hürtgen's avatar Daniel Hürtgen
Browse files

FEATURE: Optimize gitlab pipeline

parent 126bcc97
Branches
1 merge request!44TASK: Resolve "Implement tests"
Pipeline #351 passed with stages
in 6 minutes and 44 seconds
stages: stages:
- lint
- test - test
cache: cache:
paths: paths:
- vendor/ - vendor/
before_script: .lint: &lint
- apt-get update; apt-get install -y unzip image: composer
- composer install --optimize-autoloader --no-interaction --no-ansi --prefer-dist stage: lint
before_script:
lint:coding-guideline: &PHP-LINTING - apk --no-cache add parallel
image: tetraweb/php:7.0 - php -v
stage: test - composer --no-ansi self-update
script: - composer --no-ansi --version
- mkdir result - composer install --optimize-autoloader --classmap-authoritative --no-interaction --prefer-dist --no-ansi
- ./vendor/bin/phpcs -s -n --report-full=result/phpcs-full.txt --report-diff=result/phpcs-diff.txt --report-summary=result/phpcs-summary.txt
artifacts: artifacts:
when: on_failure when: on_failure
paths: paths:
- result - result
lint:
<<: *lint
script:
- find . -name \*.php ! -path "./vendor/*" | parallel --gnu php -d display_errors=stderr -l {} > /dev/null \;
lint:coding-guideline:
<<: *lint
script:
- mkdir result
- ./vendor/bin/phpcs -s -n --report-full=result/phpcs-full.txt --report-diff=result/phpcs-diff.txt --report-summary=result/phpcs-summary.txt
lint:php-mass-detection: lint:php-mass-detection:
<<: *PHP-LINTING <<: *lint
script: script:
- mkdir result - mkdir result
- ./vendor/bin/phpmd src text phpmd.xml | tee result/phpmd.txt - ./vendor/bin/phpmd src text phpmd.xml | tee result/phpmd.txt
test:5.3: &PHP-UNITTESTING .test: &test
image: tetraweb/php:5.3
stage: test stage: test
tags: tags:
- docker - docker
variables: variables:
TIMEZONE: "Europe/Berlin" TIMEZONE: "Europe/Berlin"
WITH_XDEBUG: "true" WITH_XDEBUG: "true"
before_script:
- apt-get update; apt-get install -y unzip
- composer install --optimize-autoloader --no-interaction --no-ansi --prefer-dist
script: script:
- ./vendor/bin/phpunit --coverage-text --colors=never - ./vendor/bin/phpunit --coverage-text --colors=never
test:5.3:
<<: *test
image: tetraweb/php:5.3
test:5.4: test:5.4:
<<: *PHP-UNITTESTING <<: *test
image: tetraweb/php:5.4 image: tetraweb/php:5.4
test:5.5: test:5.5:
<<: *PHP-UNITTESTING <<: *test
image: tetraweb/php:5.5 image: tetraweb/php:5.5
test:5.6: test:5.6:
<<: *PHP-UNITTESTING <<: *test
image: tetraweb/php:5.6 image: tetraweb/php:5.6
test:7.0: test:7.0:
<<: *PHP-UNITTESTING <<: *test
image: tetraweb/php:7.0 image: tetraweb/php:7.0
test:7.1: test:7.1:
<<: *PHP-UNITTESTING <<: *test
image: tetraweb/php:7.1 image: tetraweb/php:7.1
test:latest: test:latest:
<<: *PHP-UNITTESTING <<: *test
image: tetraweb/php:latest image: tetraweb/php:latest
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment