diff --git a/.travis.yml b/.travis.yml index acb39dac5a..67b25e1737 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,10 +3,11 @@ os: linux dist: xenial addons: - firefox: "47.0.1" postgresql: "9.6" -services: mysql +services: + - mysql + - docker cache: directories: @@ -24,22 +25,21 @@ env: - MUSTACHE_IGNORE_NAMES="email_html_body.mustache, email_html.mustache, email_text.mustache" jobs: - DB=pgsql MOODLE_BRANCH=MOODLE_35_STABLE - - DB=pgsql MOODLE_BRANCH=MOODLE_37_STABLE - DB=pgsql MOODLE_BRANCH=MOODLE_38_STABLE - DB=pgsql MOODLE_BRANCH=MOODLE_39_STABLE + - DB=pgsql MOODLE_BRANCH=MOODLE_310_STABLE - DB=pgsql MOODLE_BRANCH=master - DB=mysqli MOODLE_BRANCH=MOODLE_35_STABLE - - DB=mysqli MOODLE_BRANCH=MOODLE_37_STABLE - DB=mysqli MOODLE_BRANCH=MOODLE_38_STABLE - DB=mysqli MOODLE_BRANCH=MOODLE_39_STABLE + - DB=mysqli MOODLE_BRANCH=MOODLE_310_STABLE - DB=mysqli MOODLE_BRANCH=master before_install: - phpenv config-rm xdebug.ini - - nvm install v14 - cd ../.. - composer selfupdate - - composer create-project -n --no-dev --prefer-dist blackboard-open-source/moodle-plugin-ci ci dev-master + - composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ci ^3 - export PATH="$(cd ci/bin; pwd):$(cd ci/vendor/bin; pwd):$PATH" jobs: @@ -48,7 +48,7 @@ jobs: # Prechecks against latest Moodle stable only. - stage: static php: 7.4 - env: DB=mysqli MOODLE_BRANCH=MOODLE_39_STABLE + env: DB=mysqli MOODLE_BRANCH=MOODLE_310_STABLE install: - moodle-plugin-ci install --no-init script: @@ -63,7 +63,7 @@ jobs: # Smaller build matrix for development builds - stage: develop php: 7.4 - env: DB=mysqli MOODLE_BRANCH=MOODLE_39_STABLE + env: DB=mysqli MOODLE_BRANCH=MOODLE_310_STABLE exclude: - php: 7.3 env: DB=pgsql MOODLE_BRANCH=MOODLE_35_STABLE @@ -73,10 +73,6 @@ jobs: env: DB=pgsql MOODLE_BRANCH=MOODLE_35_STABLE - php: 7.4 env: DB=mysqli MOODLE_BRANCH=MOODLE_35_STABLE - - php: 7.4 - env: DB=pgsql MOODLE_BRANCH=MOODLE_37_STABLE - - php: 7.4 - env: DB=mysqli MOODLE_BRANCH=MOODLE_37_STABLE # Default 'test' stage: Unit tests and behat tests against full matrix. install: diff --git a/tests/locallib_test.php b/tests/locallib_test.php index feb2003ad5..db82a92172 100644 --- a/tests/locallib_test.php +++ b/tests/locallib_test.php @@ -34,11 +34,11 @@ */ class mod_moodleoverflow_locallib_testcase extends advanced_testcase { - public function setUp() { + public function setUp(): void { \mod_moodleoverflow\subscriptions::reset_moodleoverflow_cache(); } - public function tearDown() { + public function tearDown(): void { \mod_moodleoverflow\subscriptions::reset_moodleoverflow_cache(); } diff --git a/tests/privacy_provider_test.php b/tests/privacy_provider_test.php index 549480cc04..a5dcb83943 100644 --- a/tests/privacy_provider_test.php +++ b/tests/privacy_provider_test.php @@ -45,7 +45,7 @@ class mod_moodleoverflow_privacy_provider_testcase extends \core_privacy\tests\p /** * Test setUp. */ - public function setUp() { + public function setUp(): void { $this->resetAfterTest(true); $this->generator = $this->getDataGenerator()->get_plugin_generator('mod_moodleoverflow'); } diff --git a/tests/subscriptions_test.php b/tests/subscriptions_test.php index 2fc2e14214..e40698676d 100644 --- a/tests/subscriptions_test.php +++ b/tests/subscriptions_test.php @@ -39,7 +39,7 @@ class mod_moodleoverflow_subscriptions_testcase extends advanced_testcase { /** * Test setUp. */ - public function setUp() { + public function setUp(): void { // Clear all caches. \mod_moodleoverflow\subscriptions::reset_moodleoverflow_cache(); \mod_moodleoverflow\subscriptions::reset_discussion_cache(); @@ -48,7 +48,7 @@ public function setUp() { /** * Test tearDown. */ - public function tearDown() { + public function tearDown(): void { // Clear all caches. \mod_moodleoverflow\subscriptions::reset_moodleoverflow_cache(); \mod_moodleoverflow\subscriptions::reset_discussion_cache();