Skip to content

Commit

Permalink
Precheck generated tiny plugins files
Browse files Browse the repository at this point in the history
  • Loading branch information
mudrd8mz committed Aug 1, 2023
1 parent a117d6f commit 3ca7b1a
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/skel-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:

- name: Generate example skeletons
env:
FILES: auth block mod format
FILES: auth block mod format tiny
run: for file in $FILES; do php moodle/admin/tool/pluginskel/cli/generate.php $(realpath moodle/admin/tool/pluginskel/tests/examples/${file}.yaml); done

- name: PHP Lint
Expand All @@ -68,6 +68,7 @@ jobs:
PLUGIN_DIR=moodle/blocks/skeltest moodle-plugin-ci phplint
PLUGIN_DIR=moodle/mod/skeltest moodle-plugin-ci phplint
PLUGIN_DIR=moodle/course/format/skeltest moodle-plugin-ci phplint
PLUGIN_DIR=moodle/lib/editor/tiny/plugins/skeltest moodle-plugin-ci phplint
- name: PHP Copy/Paste Detector
if: ${{ always() }}
Expand All @@ -76,6 +77,7 @@ jobs:
PLUGIN_DIR=moodle/blocks/skeltest moodle-plugin-ci phpcpd
PLUGIN_DIR=moodle/mod/skeltest moodle-plugin-ci phpcpd
PLUGIN_DIR=moodle/course/format/skeltest moodle-plugin-ci phpcpd
PLUGIN_DIR=moodle/lib/editor/tiny/plugins/skeltest moodle-plugin-ci phpcpd
- name: PHP Mess Detector
if: ${{ always() }}
Expand All @@ -84,6 +86,7 @@ jobs:
PLUGIN_DIR=moodle/blocks/skeltest moodle-plugin-ci phpmd
PLUGIN_DIR=moodle/mod/skeltest moodle-plugin-ci phpmd
PLUGIN_DIR=moodle/course/format/skeltest moodle-plugin-ci phpmd
PLUGIN_DIR=moodle/lib/editor/tiny/plugins/skeltest moodle-plugin-ci phpmd
- name: Moodle Code Checker
if: ${{ always() }}
Expand All @@ -92,6 +95,7 @@ jobs:
PLUGIN_DIR=moodle/blocks/skeltest moodle-plugin-ci codechecker --max-warnings 0
PLUGIN_DIR=moodle/mod/skeltest moodle-plugin-ci codechecker --max-warnings 0
PLUGIN_DIR=moodle/course/format/skeltest moodle-plugin-ci codechecker --max-warnings 0
PLUGIN_DIR=moodle/lib/editor/tiny/plugins/skeltest moodle-plugin-ci codechecker --max-warnings 0
- name: Moodle PHPDoc Checker
if: ${{ always() }}
Expand All @@ -100,6 +104,7 @@ jobs:
PLUGIN_DIR=moodle/blocks/skeltest moodle-plugin-ci phpdoc
PLUGIN_DIR=moodle/mod/skeltest moodle-plugin-ci phpdoc
PLUGIN_DIR=moodle/course/format/skeltest moodle-plugin-ci phpdoc
PLUGIN_DIR=moodle/lib/editor/tiny/plugins/skeltest moodle-plugin-ci phpdoc
- name: Validating
if: ${{ always() }}
Expand All @@ -108,6 +113,7 @@ jobs:
PLUGIN_DIR=moodle/blocks/skeltest moodle-plugin-ci validate
PLUGIN_DIR=moodle/mod/skeltest moodle-plugin-ci validate
PLUGIN_DIR=moodle/course/format/skeltest moodle-plugin-ci validate
PLUGIN_DIR=moodle/lib/editor/tiny/plugins/skeltest moodle-plugin-ci validate
- name: Check upgrade savepoints
if: ${{ always() }}
Expand All @@ -116,6 +122,7 @@ jobs:
PLUGIN_DIR=moodle/blocks/skeltest moodle-plugin-ci savepoints
PLUGIN_DIR=moodle/mod/skeltest moodle-plugin-ci savepoints
PLUGIN_DIR=moodle/course/format/skeltest moodle-plugin-ci savepoints
PLUGIN_DIR=moodle/lib/editor/tiny/plugins/skeltest moodle-plugin-ci savepoints
- name: Mustache Lint
if: ${{ always() }}
Expand All @@ -124,6 +131,7 @@ jobs:
PLUGIN_DIR=moodle/blocks/skeltest moodle-plugin-ci mustache
PLUGIN_DIR=moodle/mod/skeltest moodle-plugin-ci mustache
PLUGIN_DIR=moodle/course/format/skeltest moodle-plugin-ci mustache
PLUGIN_DIR=moodle/lib/editor/tiny/plugins/skeltest moodle-plugin-ci mustache
- name: Grunt
if: ${{ always() }}
Expand All @@ -132,3 +140,4 @@ jobs:
PLUGIN_DIR=moodle/blocks/skeltest moodle-plugin-ci grunt --max-lint-warnings 0
PLUGIN_DIR=moodle/mod/skeltest moodle-plugin-ci mustache
PLUGIN_DIR=moodle/course/format/skeltest moodle-plugin-ci mustache
PLUGIN_DIR=moodle/lib/editor/tiny/plugins/skeltest moodle-plugin-ci mustache
21 changes: 21 additions & 0 deletions tests/examples/tiny.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
component: tiny_skeltest
name: Example Plugin
release: "0.1.0"
copyright: 2022 Andrew Lyons <[email protected]>
features:
settings: true
privacy:
haspersonaldata: false
uselegacypolyfill: false
tiny_features:
buttons:
- name: startdemo
category: content
text: Start demo
menuitems:
- name: startdemo
category: file
text: 'Start the demo'
options:
- name: myFirstProperty
type: string

0 comments on commit 3ca7b1a

Please sign in to comment.