Guest User

Untitled

a guest
Nov 22nd, 2018
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.22 KB | None | 0 0
  1. stages:
  2. - test
  3.  
  4. variables:
  5. MYSQL_DATABASE: sylius_test_cached
  6. MYSQL_ROOT_PASSWORD: root
  7. MYSQL_USER: root
  8. DATABASE_URL: mysql://root:root@mysql/sylius_test_cached
  9.  
  10. # Set memory limit to infinite to avoid running out of memory issues
  11. COMPOSER_MEMORY_LIMIT: -1
  12.  
  13. # Set the environments variables manually
  14. APP_ENV: test_cached
  15. APP_DEBUG: 1
  16. APP_SECRET: 1542752314
  17. MAILER_URL: smtp://localhost
  18.  
  19. PHP_DATE_TIMEZONE: Europe/Copenhagen
  20.  
  21. cache:
  22. key: $CI_BUILD_REF_NAME # changed to $CI_COMMIT_REF_NAME in Gitlab 9.x
  23. paths:
  24. - vendor
  25. - node_modules
  26. - public
  27. - .yarn
  28.  
  29. test:
  30. stage: test
  31.  
  32. # Its there for easy switching
  33. allow_failure: false
  34.  
  35. services:
  36. - mysql:5.7
  37. - memcached
  38.  
  39. # This image is optimzed for Laravel but works for Sylius as well
  40. image: edbizarro/gitlab-ci-pipeline-php:7.2-alpine
  41.  
  42. before_script:
  43. - sudo yarn config set cache-folder .yarn
  44.  
  45. script:
  46. - composer global require hirak/prestissimo # Speed up the composer install process
  47. # Install the dependencies. Don't execute scripts because the cache clean up take too long, sometimes times out
  48. - composer install --prefer-dist --no-ansi --no-scripts --no-interaction --no-progress --no-suggest
  49. - mkdir -p public/media/cache && mkdir -p public/media/image # Prevent error: public/media/image folder not found
  50. - bin/console doctrine:database:create --if-not-exists --env=test_cached -vvv # Have to run with debug = true, to omit generation proxies before setting up the database
  51. - yarn install
  52. - bin/console sylius:theme:assets:install public
  53. - bin/console sylius:install:assets
  54. - yarn build
  55. - bin/console cache:warmup --env=test_cached --no-debug -vvv
  56. - bin/console doctrine:migrations:migrate --no-interaction --env=test_cached --no-debug -vvv
  57. # Checking code style
  58. - vendor/bin/phpcs -n --standard=PSR2 src
  59. - vendor/bin/security-checker security:chec
  60. - vendor/bin/phpspec run --no-interaction -f dot
  61. - bin/console sylius:fixtures:load --no-interaction --env=test_cached --no-debug -vvv
  62. - bin/console server:run 127.0.0.1:8080 -d web --env test_cached > /dev/null 2>&1 &
  63. - echo "Starting BEHAT tests."
  64. - cp behat.yml.dist behat.yml
  65. - php bin/behat
  66. - echo "BEHAT tests done."
Add Comment
Please, Sign In to add comment