Merge pull request #75 from catalyst/reusing-workflows

Add reusable workflows
This commit is contained in:
Dmitrii Metelkin 2022-06-03 16:55:07 +10:00 committed by GitHub
commit 2366e41799
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 20 additions and 30 deletions

8
.github/workflows/ci.yml vendored Normal file
View 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

View file

@ -1,6 +1,5 @@
<a href="https://travis-ci.org/catalyst/moodle-auth_userkey"> ![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/catalyst/moodle-auth_userkey/ci/MOODLE_33PLUS)
<img src="https://travis-ci.org/catalyst/moodle-auth_userkey.svg?branch=master">
</a>
Log in to Moodle using one time user key. Log in to Moodle using one time user key.
========================================= =========================================

View file

@ -24,8 +24,6 @@
namespace auth_userkey; namespace auth_userkey;
defined('MOODLE_INTERNAL') || die;
class core_userkey_manager implements userkey_manager_interface { class core_userkey_manager implements userkey_manager_interface {
/** /**

View file

@ -25,8 +25,6 @@
namespace auth_userkey\privacy; namespace auth_userkey\privacy;
defined('MOODLE_INTERNAL') || die;
use core_privacy\local\metadata\null_provider; use core_privacy\local\metadata\null_provider;
use core_privacy\local\legacy_polyfill; use core_privacy\local\legacy_polyfill;

View file

@ -24,8 +24,6 @@
namespace auth_userkey; namespace auth_userkey;
defined('MOODLE_INTERNAL') || die();
/** /**
* Interface userkey_manager_interface describes key manager behaviour. * Interface userkey_manager_interface describes key manager behaviour.
* *

View file

@ -22,8 +22,6 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
defined('MOODLE_INTERNAL') || die;
function xmldb_auth_userkey_upgrade($oldversion) { function xmldb_auth_userkey_upgrade($oldversion) {
global $DB; global $DB;

View file

@ -22,8 +22,6 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
defined('MOODLE_INTERNAL') || die();
/** /**
* Tests for auth_plugin_userkey class. * Tests for auth_plugin_userkey class.
* *
@ -46,7 +44,7 @@ class auth_plugin_userkey_testcase extends advanced_testcase {
/** /**
* Initial set up. * Initial set up.
*/ */
public function setUp() { public function setUp(): void {
global $CFG; global $CFG;
require_once($CFG->libdir . "/externallib.php"); require_once($CFG->libdir . "/externallib.php");

View file

@ -22,8 +22,6 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
defined('MOODLE_INTERNAL') || die();
use auth_userkey\core_userkey_manager; use auth_userkey\core_userkey_manager;
/** /**
@ -51,7 +49,7 @@ class core_userkey_manager_testcase extends advanced_testcase {
/** /**
* Initial set up. * Initial set up.
*/ */
public function setUp() { public function setUp(): void {
global $CFG; global $CFG;
parent::setUp(); parent::setUp();

View file

@ -22,9 +22,6 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @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 { class auth_userkey_externallib_testcase extends advanced_testcase {
/** /**
* User object. * User object.
@ -36,7 +33,7 @@ class auth_userkey_externallib_testcase extends advanced_testcase {
/** /**
* Initial set up. * Initial set up.
*/ */
public function setUp() { public function setUp(): void {
global $CFG; global $CFG;
require_once($CFG->libdir . "/externallib.php"); require_once($CFG->libdir . "/externallib.php");

View file

@ -24,9 +24,6 @@
namespace auth_userkey; namespace auth_userkey;
defined('MOODLE_INTERNAL') || die();
class fake_userkey_manager implements userkey_manager_interface { class fake_userkey_manager implements userkey_manager_interface {
public function create_key($userid, $allowedips = null) { public function create_key($userid, $allowedips = null) {

View file

@ -24,8 +24,9 @@
defined('MOODLE_INTERNAL') || die; defined('MOODLE_INTERNAL') || die;
$plugin->version = 2020050801; // The current plugin version (Date: YYYYMMDDXX) $plugin->version = 2022011600; // The current plugin version (Date: YYYYMMDDXX)
$plugin->release = 2020050801; // Match release exactly to version. $plugin->release = 2022011600; // Match release exactly to version.
$plugin->requires = 2017051500; // Requires Moodle 3.3 version. $plugin->requires = 2017051500; // Requires Moodle 3.3 version.
$plugin->component = 'auth_userkey'; // Full name of the plugin (used for diagnostics). $plugin->component = 'auth_userkey'; // Full name of the plugin (used for diagnostics).
$plugin->maturity = MATURITY_STABLE; $plugin->maturity = MATURITY_STABLE;
$plugin->supported = [33, 310]; // A range of branch numbers of supported moodle versions.