image: composer:latest stages: - build - test build-job: stage: build script: - php -v - composer install --no-interaction --no-progress artifacts: paths: - vendor/ expire_in: 1 hour unit-test-job: stage: test needs: [build-job] script: # Юнит-тесты не требуют базы и должны проходить всегда - ./vendor/bin/phpunit --testsuite unit --testdox integration-test-job: stage: test needs: [build-job] script: # Интеграционным нужен config.local.php с реквизитами базы. Его нет в репозитории, # поэтому в CI набор пропускается сам: это заявлено явно, а не замаскировано зелёным прогоном - ./vendor/bin/phpunit --testsuite integration --testdox lint-job: stage: test needs: [build-job] script: # Проверка синтаксиса всей кодовой базы - find core src admin tests -name "*.php" -print0 | xargs -0 -n1 php -l