Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ os: linux
dist: xenial

addons:
firefox: "47.0.1"
postgresql: "9.6"

services: mysql
services:
- mysql
- docker

cache:
directories:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions tests/locallib_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down
2 changes: 1 addition & 1 deletion tests/privacy_provider_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down
4 changes: 2 additions & 2 deletions tests/subscriptions_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand Down