.gitlab-ci.yml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. stages:
  2. - test
  3. variables:
  4. APP_ENV: staging
  5. SSH_PRIVATE_KEY: $SSH_PRIVATE_KEY
  6. XDEBUG_MODE: coverage
  7. cache:
  8. paths:
  9. - ./vendor
  10. before_script:
  11. - bash tests/ci_docker_install.sh > /dev/null
  12. - php -v
  13. unit:
  14. stage: test
  15. script:
  16. - php vendor/phpunit/phpunit/phpunit --configuration phpunit.xml.dist --colors=never --no-interaction --testsuite=unit
  17. #- php vendor/phpunit/phpunit/phpunit --configuration phpunit.xml.dist --colors=never --no-interaction --no-coverage --testsuite=application
  18. artifacts:
  19. paths:
  20. - ./coverage/
  21. when: always
  22. reports:
  23. junit: ./coverage/junit-report.xml
  24. coverage: '/^\s*Lines:\s*\d+.\d+\%/'
  25. #doctrine:
  26. # script:
  27. # - php bin/console d:s:v
  28. static_analysis:
  29. script:
  30. - php vendor/bin/phpstan analyse -c phpstan.neon.dist --error-format gitlab > phpstan.json # Display code quality in MR
  31. - php vendor/bin/phpstan analyse -c phpstan.neon.dist
  32. artifacts:
  33. when: always
  34. reports:
  35. codequality: phpstan.json
  36. code_style:
  37. script:
  38. - php vendor/bin/php-cs-fixer check --config=.php-cs-fixer.dist.php