Advertisement
Guest User

Untitled

a guest
Feb 21st, 2020
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.19 KB | None | 0 0
  1. image: moodlehq/moodle-php-apache:7.2
  2.  
  3. services:
  4.   - mysql:5.7
  5.  
  6. variables:
  7.   MYSQL_DATABASE: "moodlestable"
  8.   MYSQL_ROOT_PASSWORD: ""
  9.   MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
  10.  
  11. before_script:
  12.   # Update packages and install git.
  13.  - apt-get update -qq
  14.   - apt-get install -y -qq git
  15.   - git --version
  16.   - git config --global user.email "gitlab@example.com"
  17.   - git config --global user.name "Gitlab Test"
  18.   - git clone git://github.com/moodle/moodle.git moodle
  19.   - cd moodle
  20.   - git checkout MOODLE_38_STABLE
  21.   # Install Moodle.
  22.  - php admin/cli/install.php --non-interactive --wwwroot=http://localhost --fullname=test --shortname=test --adminpass=test --agree-license --dataroot=/var/www/moodledata --dbtype=mysqli --dbhost=mysql --dbuser=root --dbpass= --dbname=moodle --skip-database --allow-unstable
  23.   # Inject the PHPUnit settings into the config.php file.
  24.  - sed -i '25i$CFG->phpunit_prefix = "phpu_"; $CFG->phpunit_dataroot = "/var/www/phpunitdata";' config.php
  25.  
  26. jobtest:
  27.   script:
  28.   # Initialize PHPunit.
  29.  - php admin/tool/phpunit/cli/init.php
  30.   - php admin/tool/phpunit/cli/util.php --buildcomponentconfigs
  31.   # Run unit tests for the custom plugins on the site.
  32.  - vendor/bin/phpunit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement