Skip to content

Instantly share code, notes, and snippets.

@danielneis
Last active June 20, 2020 20:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielneis/b0fa8248151e2e73a8d3261621ecdee9 to your computer and use it in GitHub Desktop.
Save danielneis/b0fa8248151e2e73a8d3261621ecdee9 to your computer and use it in GitHub Desktop.
variables:
DB: 'pgsql'
PHP: '7.1'
BROWSER: 'chrome'
before_script:
- apt install git -y
- git clone --depth 1 https://github.com/moodlehq/moodle-docker.git $HOME/moodle-docker
- cd $HOME/moodle-docker
- export MOODLE_DOCKER_WWWROOT=$CI_PROJECT_DIR
- echo $MOODLE_DOCKER_WWWROOT
- ls $MOODLE_DOCKER_WWWROOT
- cp config.docker-template.php $MOODLE_DOCKER_WWWROOT/config.php
- export MOODLE_DOCKER_DB=$DB
- export MOODLE_DOCKER_PHP_VERSION=$PHP
- export MOODLE_DOCKER_BROWSER=$BROWSER
- bin/moodle-docker-compose up -d
- bin/moodle-docker-wait-for-db
- bin/moodle-docker-compose exec -T webserver php admin/tool/phpunit/cli/init.php
- bin/moodle-docker-compose exec -T webserver php admin/tool/behat/cli/init.php
job1:
script:
- bin/moodle-docker-compose exec -T webserver vendor/bin/phpunit --testsuite=mod_customcert_testsuite
- bin/moodle-docker-compose exec -T webserver php admin/tool/behat/cli/run.php --tags=@mod_customcert
- bin/moodle-docker-compose down
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment