diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d24b075..bc8b26b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,19 +24,14 @@ test:backend: script: - export TEMP_DEV_IMAGE="${CONTAINER_IMAGE}:ci-${CI_BUILD_ID}" - docker build --pull -f Dockerfile-dev -t $TEMP_DEV_IMAGE . - # https://github.com/FriendsOfPHP/PHP-CS-Fixer#using-php-cs-fixer-on-ci - - COMMIT_RANGE="${CI_COMMIT_BEFORE_SHA}...${CI_COMMIT_SHA}" - - CHANGED_FILES=$(git diff --name-only --diff-filter=ACMRTUXB "${COMMIT_RANGE}") - - | - if ! echo "${CHANGED_FILES}" | grep -qE "^(\\.php_cs(\\.dist)?|composer\\.lock)$"; then - EXTRA_ARGS=$(printf -- '--path-mode=intersection\n--\n%s' "${CHANGED_FILES}") - else - EXTRA_ARGS='' - fi - > docker run --rm $TEMP_DEV_IMAGE - vendor/bin/php-cs-fixer fix -v --dry-run --stop-on-violation --using-cache=no ${EXTRA_ARGS} + bash -c " + rm /usr/local/etc/php/conf.d/xdebug.ini && + cp -r /var/www/vendor /var/www/html/vendor && + vendor/bin/php-cs-fixer fix -v --dry-run + " - > docker run --rm --add-host=mariadb:`getent hosts mariadb | awk '{ print $1 ; exit }'`