Skip to content

💚 Rework Moodle Plugin CI and fix pgsql + ESLint failures - #8

Merged
DamienVauchel merged 3 commits into
mainfrom
feature/update-ci
Jun 29, 2026
Merged

💚 Rework Moodle Plugin CI and fix pgsql + ESLint failures#8
DamienVauchel merged 3 commits into
mainfrom
feature/update-ci

Conversation

@DamienVauchel

@DamienVauchel DamienVauchel commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

🎯 Purpose

Rework the Moodle Plugin CI workflow and fix the two failures it surfaced so the pipeline is green.

📝 Summary of Changes

  • .github/workflows/ci.yml — run on all push/PR, add the full moodle-plugin-ci step set (phplint, phpmd, phpcs, phpdoc, validate, savepoints, mustache, grunt, phpunit, behat), test PHP 8.1/8.2/8.3 on MOODLE_405_STABLE against both PostgreSQL and MariaDB.
  • classes/local/activity_manager.php — order the outdated-content query by the selected column (es.edflexid) so SELECT DISTINCT is valid on PostgreSQL (MariaDB tolerated the old ORDER BY es.lastsync, es.id, pgsql rejected it). Dropped two dead query params.
  • amd/src/*.js — suppress the no-alert, consistent-return and camelcase ESLint warnings that broke the grunt step under --max-lint-warnings 0. Comment-only, so the committed amd/build/ stays in sync.

🧪 Testing

  • CI matrix (PHP 8.1/8.2/8.3 × pgsql/mariadb) on MOODLE_405_STABLE.
  • activity_manager_test::test_get_outdated_edflex_contentids_in_chunks now passes on PostgreSQL.

🔄 Regression Risk

Low. The query change only affects result ordering of an internal sync chunk iterator (callers don't depend on lastsync order); the JS changes are lint suppressions with no runtime effect.

Order outdated-content query by the selected column so SELECT DISTINCT is
valid on PostgreSQL; suppress no-alert/consistent-return/camelcase warnings
that broke the grunt step under --max-lint-warnings 0.
@DamienVauchel DamienVauchel changed the title update ci information 💚 Rework Moodle Plugin CI and fix pgsql + ESLint failures Jun 29, 2026
Inline eslint-disable comments shifted the AMD source content, leaving the
committed amd/build source maps stale (grunt rebuilds them and fails). A
plugin-level .eslintrc keeps amd/src byte-identical so the build stays in
sync, while still silencing no-alert/consistent-return/camelcase under
grunt --max-lint-warnings 0.
@DamienVauchel
DamienVauchel merged commit 0dee336 into main Jun 29, 2026
12 checks passed
@DamienVauchel
DamienVauchel deleted the feature/update-ci branch June 29, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants