Created
July 12, 2017 17:00
-
-
Save ygerasimov/6681a2aa89c4e8f7f51709559236d046 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Lamp + PHP CS + Drush | |
image: sharpe/drupal:latest | |
pipelines: | |
branches: | |
8.x-1.x: | |
- step: | |
script: | |
#start mysql and create drupal db | |
- service mysql start | |
- mysql -h localhost --user=root --password=root -e "CREATE DATABASE drupal;" | |
# Install from composer.json | |
- composer install --no-interaction | |
# Run PHP Code Sniffer on custom modules | |
- phpcs --standard=Drupal --ignore=node_modules,*.css,*.md,*.txt,*.info.yml docroot/profiles/contrib/openedu | |
# Make our repo the webroot | |
- rm -rf /var/www | |
- ln -s docroot html | |
- ln -s $(pwd) /var/www | |
#for some reason apache doesn't start by default when docker images are run through Bitbucket CI, so we start it manually | |
- apache2-foreground > /dev/null 2>&1 & | |
# Navigate to the root to run out tests | |
- cd /var/www/html | |
# setup a generic site install, needed for testing | |
- drush status | |
- drush si openedu --db-url='mysql://root:[email protected]/drupal' --account-pass='imagex' -y | |
# Run Tests | |
- export SIMPLETEST_DB=mysql://root:[email protected]/drupal | |
- export SIMPLETEST_BASE_URL=http://localhost/ | |
- ../bin/phpunit -c core ./profiles/contrib/openedu |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment