13 Commits

Author SHA1 Message Date
Dmitrii Metelkin
0609e7c952 Merge pull request #357 from catalyst/issue356-38
Fix #356
2025-01-15 15:41:18 +11:00
david adamson
5670df2b4d Fix #356 2025-01-15 14:26:37 +11:00
Brendan Heywood
555644e486 Merge pull request #292 from catalyst/ci-workflow-alignment-for-MOODLE_38_STABLE
[#291] chore: ci usage alignment and cleanup
2022-03-24 19:38:27 +11:00
Kevin Pham
24758a256e [#291] chore: ci usage alignment and cleanup 2022-03-23 14:59:07 +11:00
Anupama Dharmajan
65b12dcf69 Fix workflow status badge and bump version number 2022-01-14 12:11:28 +11:00
Anupama Dharmajan
15d67370de Fix plugin name in moodle release and bump version 2022-01-13 17:36:38 +11:00
Brendan Heywood
b892943aad Merge pull request #274 from catalyst/MOODLE_38_STABLE-reusing-workflows
Add reusable workflows
2022-01-13 16:42:55 +11:00
Anupama Dharmajan
5f9788a6fe Add reusable workflows 2022-01-13 15:26:03 +11:00
Jerome Charaoui
c4fc4b4396 Include filelib.php to fix class not found exception 2021-05-06 10:29:33 +12:00
Dan Marsden
e632b1c2f9 We haven't been testing postgres on 3.5 - it needs pg12
disable pg test for now, but we should think about adding it back.
2021-05-06 10:04:50 +12:00
Dan Marsden
b4d996125d Update Readme with new branch naming. 2021-05-06 10:04:24 +12:00
Dan Marsden
f8d0d658fa tidy up github action config. 2021-05-05 20:23:22 +12:00
Dan Marsden
a38deb7abf Test 3.5 and 3.8 on this branch. 2021-05-05 14:53:07 +12:00
27 changed files with 19 additions and 179 deletions

View File

@@ -1,130 +1,11 @@
name: Moodle plugin CI for master
name: ci
# Controls when the action will run.
on: [push, pull_request]
jobs:
citest:
name: CI test
runs-on: 'ubuntu-latest'
services:
postgres:
image: postgres
env:
POSTGRES_USER: 'postgres'
POSTGRES_HOST_AUTH_METHOD: 'trust'
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 3
ports:
- 5432:5432
mariadb:
image: mariadb
env:
MYSQL_USER: 'root'
MYSQL_ALLOW_EMPTY_PASSWORD: "true"
ports:
- 3306:3306
options: >-
--health-cmd="mysqladmin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 3
strategy:
fail-fast: false
matrix:
database: ['pgsql', 'mariadb']
moodle-branch: ['MOODLE_39_STABLE']
node: ['14.15.1']
php: ['7.2', '7.3']
include:
- {moodle-branch: 'MOODLE_35_STABLE', php: '7.1', node: '14.15.1', database: 'mariadb'}
- {moodle-branch: 'MOODLE_35_STABLE', php: '7.2', node: '14.15.1', database: 'mariadb'}
- {moodle-branch: 'MOODLE_39_STABLE', php: '7.4', node: '14.15.1', database: 'mariadb'}
- {moodle-branch: 'MOODLE_39_STABLE', php: '7.4', node: '14.15.1', database: 'pgsql'}
- {moodle-branch: 'MOODLE_310_STABLE', php: '7.4', node: '14.15.1', database: 'mariadb'}
- {moodle-branch: 'MOODLE_311_STABLE', php: '7.4', node: '14.15.1', database: 'pgsql'}
steps:
- name: Check out repository code
uses: actions/checkout@v2
with:
path: plugin
- name: Install node ${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Setup PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: pgsql, zip, gd, xmlrpc, soap
coverage: none
- name: Initialise moodle-plugin-ci
run: |
composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ci ^3
# Add dirs to $PATH
echo $(cd ci/bin; pwd) >> $GITHUB_PATH
echo $(cd ci/vendor/bin; pwd) >> $GITHUB_PATH
# PHPUnit depends on en_AU.UTF-8 locale
sudo locale-gen en_AU.UTF-8
- name: Install Moodle
run: |
mkdir ~/.npm-global
export PATH=~/.npm-global/bin:$PATH
source ~/.profile
moodle-plugin-ci install -vvv --plugin ./plugin --db-host=127.0.0.1
env:
DB: ${{ matrix.database }}
MOODLE_BRANCH: ${{ matrix.moodle-branch }}
- name: Run phplint
if: ${{ always() }}
run: moodle-plugin-ci phplint
- name: Run phpcpd
if: ${{ always() }}
run: moodle-plugin-ci phpcpd || true
- name: Run phpmd
if: ${{ always() }}
run: moodle-plugin-ci phpmd
- name: Run codechecker
if: ${{ always() }}
run: moodle-plugin-ci codechecker
- name: Run validate
if: ${{ always() }}
run: moodle-plugin-ci validate
- name: Run savepoints
if: ${{ always() }}
run: moodle-plugin-ci savepoints
- name: Run mustache
if: ${{ always() }}
run: moodle-plugin-ci phpcpd
- name: Run grunt
if: ${{ always() }}
run: moodle-plugin-ci grunt
- name: Run phpdoc
if: ${{ always() }}
run: moodle-plugin-ci phpdoc
- name: Run phpunit
if: ${{ always() }}
run: moodle-plugin-ci phpunit
# - name: Run behat
# if: ${{ always() }}
# run: moodle-plugin-ci behat --profile chrome
test:
uses: catalyst/catalyst-moodle-workflows/.github/workflows/ci.yml@main
secrets:
moodle_org_token: ${{ secrets.MOODLE_ORG_TOKEN }}
with:
disable_behat: true

View File

@@ -1,6 +1,4 @@
<a href="https://travis-ci.org/catalyst/moodle-auth_outage">
<img src="https://travis-ci.org/catalyst/moodle-auth_outage.svg?branch=master">
</a>
[![ci](https://github.com/catalyst/moodle-auth_outage/actions/workflows/ci.yml/badge.svg?branch=MOODLE_38_STABLE)](https://github.com/catalyst/moodle-auth_outage/actions/workflows/ci.yml?branch=MOODLE_38_STABLE)
# Moodle Outage manager plugin
* [Version Support](#version-support)
@@ -46,8 +44,10 @@ Branches
| ----------------- | ----------- | ---- |
| Moodle 2.7 to 3.2 | MOODLE_32_STABLE | 5.5+ |
| Totara up to 10 | TOTARA_10 | 5.5+ |
| Moodle 3.3+ | master | 7.0+ |
| Totara 11+ | master | 7.0+ |
| Moodle 3.3 to 3.8 | MOODLE_38_STABLE | 7.1+ |
| Totara 11 to 12 | MOODLE_38_STABLE | 7.1+ |
| Moodle 3.9+ | MOODLE_39_STABLE | 7.2+ |
| Totara 13+ | MOODLE_39_STABLE | 7.2+ |
Screenshots
-----------

View File

@@ -28,8 +28,6 @@ namespace auth_outage\event;
use core\event\base;
use moodle_url;
defined('MOODLE_INTERNAL') || die();
/**
* outage_created class.
*

View File

@@ -27,8 +27,6 @@ namespace auth_outage\event;
use core\event\base;
use moodle_url;
defined('MOODLE_INTERNAL') || die();
/**
* outage_deleted class.
*

View File

@@ -28,8 +28,6 @@ namespace auth_outage\event;
use core\event\base;
use moodle_url;
defined('MOODLE_INTERNAL') || die();
/**
* outage_updated class.
*

View File

@@ -27,8 +27,6 @@ namespace auth_outage\local\cli;
use Exception;
defined('MOODLE_INTERNAL') || die();
/**
* cli_exception class.
*

View File

@@ -29,8 +29,6 @@ use auth_outage\local\outagelib;
use coding_exception;
use core\session\manager;
defined('MOODLE_INTERNAL') || die();
/**
* clibase class.
*

View File

@@ -29,8 +29,6 @@ use auth_outage\dml\outagedb;
use auth_outage\local\outage;
use coding_exception;
defined('MOODLE_INTERNAL') || die();
/**
* create class.
*

View File

@@ -28,8 +28,6 @@ namespace auth_outage\local\cli;
use auth_outage\dml\outagedb;
use auth_outage\local\outage;
defined('MOODLE_INTERNAL') || die();
/**
* finish class.
*

View File

@@ -28,8 +28,6 @@ namespace auth_outage\local\cli;
use auth_outage\dml\outagedb;
use auth_outage\local\outage;
defined('MOODLE_INTERNAL') || die();
/**
* waitforit class.
*

View File

@@ -32,8 +32,6 @@ use coding_exception;
use context_system;
use moodle_url;
defined('MOODLE_INTERNAL') || die();
/**
* infopage class.
*

View File

@@ -29,8 +29,6 @@ use auth_outage\local\outage;
use coding_exception;
use DOMDocument;
defined('MOODLE_INTERNAL') || die();
/**
* maintenance_static_page class.
*

View File

@@ -32,8 +32,6 @@ use DOMElement;
use invalid_state_exception;
use moodle_url;
defined('MOODLE_INTERNAL') || die();
/**
* maintenance_static_page_generator class.
*

View File

@@ -31,8 +31,6 @@ use finfo;
use invalid_parameter_exception;
use moodle_url;
defined('MOODLE_INTERNAL') || die();
/**
* maintenance_static_page_io class.
*

View File

@@ -28,8 +28,6 @@ namespace auth_outage\local;
use coding_exception;
use stdClass;
defined('MOODLE_INTERNAL') || die();
/**
* outage class.
*

View File

@@ -65,6 +65,9 @@ class outagelib {
* @param string $file file to be fetched
*/
public static function fetch_page($file) {
global $CFG;
require_once($CFG->libdir . '/filelib.php');
$curl = new curl();
$contents = $curl->get($file);
$info = $curl->get_info();

View File

@@ -33,8 +33,6 @@ use html_writer;
use moodle_url;
use plugin_renderer_base;
defined('MOODLE_INTERNAL') || die();
/**
* auth_outage_renderer class.
*

View File

@@ -23,8 +23,6 @@
namespace auth_outage\privacy;
defined('MOODLE_INTERNAL') || die();
use core_privacy\local\legacy_polyfill;
/**

View File

@@ -29,8 +29,6 @@ use auth_outage\local\controllers\infopage;
use auth_outage\local\outagelib;
use core\task\scheduled_task;
defined('MOODLE_INTERNAL') || die();
/**
* update_static_page class.
*

View File

@@ -24,8 +24,6 @@
*/
use auth_outage\local\controllers\maintenance_static_page;
defined('MOODLE_INTERNAL') || die();
/**
* Auth Outage plugin uninstall code.
* @return bool result

View File

@@ -22,7 +22,6 @@
* @copyright 2016 Catalyst IT
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/**
* Outage plugin upgrade code

View File

@@ -25,8 +25,6 @@
use auth_outage\local\outagelib;
defined('MOODLE_INTERNAL') || die;
/**
* Used for adminlib::set_updatedcallback which requires a string that resolves to a function.
*
@@ -86,4 +84,4 @@ function auth_outage_get_fontawesome_icon_map() {
function auth_outage_before_standard_top_of_body_html() {
// Get code to inject.
return outagelib::get_inject_code();
}
}

View File

@@ -26,8 +26,6 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/**
* auth_outage_renderer class.
*

View File

@@ -33,8 +33,6 @@
use auth_outage\dml\outagedb;
defined('MOODLE_INTERNAL') || die();
/**
* auth_outage_base_testcase class.
*

View File

@@ -26,8 +26,6 @@
use auth_outage\calendar\calendar;
use auth_outage\local\outage;
defined('MOODLE_INTERNAL') || die();
/**
* calendar_test test class.
*

View File

@@ -26,8 +26,6 @@
use auth_outage\dml\outagedb;
use auth_outage\local\outage;
defined('MOODLE_INTERNAL') || die();
/**
* events_test tests class.
*

View File

@@ -28,7 +28,8 @@
defined('MOODLE_INTERNAL') || die();
$plugin->component = "auth_outage";
$plugin->version = 2021032500; // The current plugin version (Date: YYYYMMDDXX).
$plugin->release = 2021032500; // Human-readable release information.
$plugin->version = 2021032503; // The current plugin version (Date: YYYYMMDDXX).
$plugin->release = 2021032503; // Human-readable release information.
$plugin->requires = 2017051500; // Requires 3.3 and higher.
$plugin->maturity = MATURITY_STABLE; // Suitable for PRODUCTION environments!
$plugin->supported = [33, 38]; // A range of branch numbers of supported moodle versions.