You are here

bitbucket-pipelines.yml in Permissions by Term 8

Same filename and directory in other branches
  1. 8.2 bitbucket-pipelines.yml

File

bitbucket-pipelines.yml
View source
  1. # This is a sample build configuration for PHP.
  2. # Check our guides at https://confluence.atlassian.com/x/e8YWN for more examples.
  3. # Only use spaces to indent your .yml configuration.
  4. # -----
  5. # You can specify a custom docker image from Docker Hub as your build environment.
  6. image: derh4nnes/pipeline-behat:latest
  7. clone:
  8. depth: full
  9. pipelines:
  10. default:
  11. - step:
  12. name: Build and test
  13. caches:
  14. - composer
  15. script:
  16. - apt-get update
  17. - apt-get install -y screen php7.1-sqlite libsqlite3-dev sqlite3
  18. - curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh -o install_nvm.sh
  19. - bash install_nvm.sh
  20. - source ~/.profile
  21. - nvm install 9.11.1
  22. - export PATH="$HOME/.composer/vendor/bin:$PATH"
  23. - cd ..
  24. - mkdir permissions_by_term/
  25. - mv build/* permissions_by_term/
  26. - mv permissions_by_term/ build/
  27. - cd build
  28. - composer create-project drupal-composer/drupal-project:8.x-dev drupal --stability dev --no-interaction
  29. - (cd drupal && composer require behat/behat:^3.0 behat/mink-extension:^2.2 drupal/drupal-extension:^3.2 --dev)
  30. - mv permissions_by_term drupal/web/modules/
  31. - (cd drupal/web/modules/permissions_by_term/tests/ && ../../../../vendor/bin/phpunit --testdox)
  32. - (cd drupal/web/modules/permissions_by_term/js/ && npm install && npm run bat)
  33. - (cd drupal/web && ../vendor/drush/drush/drush si standard --db-url=sqlite://sites/default/files/db.sqlite -y && ../vendor/drush/drush/drush en permissions_by_term -y)
  34. - (cd drupal && cp web/modules/permissions_by_term/tests/src/Behat/composer-require-namespace.php . && php composer-require-namespace.php && composer dump-autoload)
  35. - (cd drupal && cat composer.json)
  36. - screen -dmS php-server php -S localhost:8000 -t ./drupal/web
  37. - (cd drupal/web && cp modules/permissions_by_term/tests/src/Behat/behat.yml.dist behat.yml && ../vendor/bin/behat)
  38. services:
  39. - testing
  40. - step:
  41. name: Deploy
  42. script:
  43. - apt-get update && apt-get install -y unzip git
  44. - git remote add d.o jepSter@git.drupal.org:project/permissions_by_term.git
  45. - git config --global push.default simple
  46. - git config --global user.name "Peter Majmesku"
  47. - git push -u d.o
  48. - git push --tags
  49. definitions:
  50. services:
  51. testing:
  52. image: darksolar/selenium-chrome-headless