.gitlab-ci.yml 947 B

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