.gitlab-ci.yml 995 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. static_analysis:
  14. script:
  15. - php vendor/bin/phpstan analyse -c phpstan.neon.dist --error-format gitlab > phpstan.json # Display code quality in MR
  16. artifacts:
  17. when: always
  18. reports:
  19. codequality: phpstan.json
  20. code_style:
  21. script:
  22. - php vendor/bin/php-cs-fixer check --config=.php-cs-fixer.dist.php
  23. unit:
  24. stage: test
  25. script:
  26. - php vendor/phpunit/phpunit/phpunit --configuration phpunit.xml.dist --colors=never --no-interaction --testsuite=unit
  27. #- php vendor/phpunit/phpunit/phpunit --configuration phpunit.xml.dist --colors=never --no-interaction --no-coverage --testsuite=application
  28. artifacts:
  29. paths:
  30. - ./coverage/
  31. when: always
  32. reports:
  33. junit: ./coverage/junit-report.xml
  34. coverage: '/^\s*Lines:\s*\d+.\d+\%/'