Merge pull request #75 from catalyst/reusing-workflows
Add reusable workflows
This commit is contained in:
commit
2366e41799
13 changed files with 20 additions and 30 deletions
8
.github/workflows/ci.yml
vendored
Normal file
8
.github/workflows/ci.yml
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
# .github/workflows/ci.yml
|
||||
name: ci
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
uses: catalyst/catalyst-moodle-workflows/.github/workflows/ci.yml@main
|
|
@ -1,6 +1,5 @@
|
|||
<a href="https://travis-ci.org/catalyst/moodle-auth_userkey">
|
||||
<img src="https://travis-ci.org/catalyst/moodle-auth_userkey.svg?branch=master">
|
||||
</a>
|
||||
![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/catalyst/moodle-auth_userkey/ci/MOODLE_33PLUS)
|
||||
|
||||
|
||||
Log in to Moodle using one time user key.
|
||||
=========================================
|
||||
|
|
|
@ -24,8 +24,6 @@
|
|||
|
||||
namespace auth_userkey;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
|
||||
class core_userkey_manager implements userkey_manager_interface {
|
||||
|
||||
/**
|
||||
|
|
|
@ -25,8 +25,6 @@
|
|||
|
||||
namespace auth_userkey\privacy;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
|
||||
use core_privacy\local\metadata\null_provider;
|
||||
use core_privacy\local\legacy_polyfill;
|
||||
|
||||
|
|
|
@ -24,8 +24,6 @@
|
|||
|
||||
namespace auth_userkey;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
/**
|
||||
* Interface userkey_manager_interface describes key manager behaviour.
|
||||
*
|
||||
|
@ -60,4 +58,4 @@ interface userkey_manager_interface {
|
|||
*/
|
||||
public function validate_key($keyvalue);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,8 +22,6 @@
|
|||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
|
||||
function xmldb_auth_userkey_upgrade($oldversion) {
|
||||
global $DB;
|
||||
|
||||
|
|
|
@ -28,4 +28,4 @@ if (!is_enabled_auth('userkey')) {
|
|||
print_error(get_string('pluginisdisabled', 'auth_userkey'));
|
||||
}
|
||||
|
||||
get_auth_plugin('userkey')->user_login_userkey();
|
||||
get_auth_plugin('userkey')->user_login_userkey();
|
||||
|
|
|
@ -28,4 +28,4 @@ if (!is_enabled_auth('userkey')) {
|
|||
print_error(get_string('pluginisdisabled', 'auth_userkey'));
|
||||
}
|
||||
|
||||
get_auth_plugin('userkey')->user_logout_userkey();
|
||||
get_auth_plugin('userkey')->user_logout_userkey();
|
||||
|
|
|
@ -22,8 +22,6 @@
|
|||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
/**
|
||||
* Tests for auth_plugin_userkey class.
|
||||
*
|
||||
|
@ -46,7 +44,7 @@ class auth_plugin_userkey_testcase extends advanced_testcase {
|
|||
/**
|
||||
* Initial set up.
|
||||
*/
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
global $CFG;
|
||||
|
||||
require_once($CFG->libdir . "/externallib.php");
|
||||
|
|
|
@ -22,8 +22,6 @@
|
|||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
use auth_userkey\core_userkey_manager;
|
||||
|
||||
/**
|
||||
|
@ -51,7 +49,7 @@ class core_userkey_manager_testcase extends advanced_testcase {
|
|||
/**
|
||||
* Initial set up.
|
||||
*/
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
global $CFG;
|
||||
|
||||
parent::setUp();
|
||||
|
|
|
@ -22,9 +22,6 @@
|
|||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
|
||||
class auth_userkey_externallib_testcase extends advanced_testcase {
|
||||
/**
|
||||
* User object.
|
||||
|
@ -36,7 +33,7 @@ class auth_userkey_externallib_testcase extends advanced_testcase {
|
|||
/**
|
||||
* Initial set up.
|
||||
*/
|
||||
public function setUp() {
|
||||
public function setUp(): void {
|
||||
global $CFG;
|
||||
|
||||
require_once($CFG->libdir . "/externallib.php");
|
||||
|
|
|
@ -24,9 +24,6 @@
|
|||
|
||||
namespace auth_userkey;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
|
||||
class fake_userkey_manager implements userkey_manager_interface {
|
||||
|
||||
public function create_key($userid, $allowedips = null) {
|
||||
|
@ -40,4 +37,4 @@ class fake_userkey_manager implements userkey_manager_interface {
|
|||
public function validate_key($keyvalue) {
|
||||
// TODO: Implement validate_key() method.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,8 +24,9 @@
|
|||
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
|
||||
$plugin->version = 2020050801; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->release = 2020050801; // Match release exactly to version.
|
||||
$plugin->version = 2022011600; // The current plugin version (Date: YYYYMMDDXX)
|
||||
$plugin->release = 2022011600; // Match release exactly to version.
|
||||
$plugin->requires = 2017051500; // Requires Moodle 3.3 version.
|
||||
$plugin->component = 'auth_userkey'; // Full name of the plugin (used for diagnostics).
|
||||
$plugin->maturity = MATURITY_STABLE;
|
||||
$plugin->supported = [33, 310]; // A range of branch numbers of supported moodle versions.
|
||||
|
|
Loading…
Reference in a new issue