Skip to content

Conversation

@jay-oswald
Copy link
Contributor

So far un-tested, creating the PR now, will need to refrence this branch in some repositories to test it properly

@jay-oswald jay-oswald requested a review from Copilot January 13, 2026 00:14
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR restructures the CI workflow by splitting individual checks (phpunit, codechecker, phplint, etc.) into separate jobs instead of running them sequentially within a single setup job. The changes introduce a canonical workspace setup that is shared across jobs via artifact upload/download, and uses YAML anchors for common configuration.

Changes:

  • Refactored CI checks from a single setup job into multiple independent jobs (codechecker, phplint, validate, savepoints, mustache, grunt, phpcpd, phpmd, behat, phpdoc)
  • Added a setup-single job that creates a canonical workspace artifact shared across all check jobs
  • Simplified the plugin setup action by removing check execution logic and check-specific inputs, replacing them with environment configuration inputs

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 14 comments.

File Description
.github/workflows/ci.yml Splits monolithic setup job into individual check jobs, adds canonical workspace setup, updates deprecated GitHub Actions output syntax
.github/plugin/setup/action.yml Removes all check execution steps and their related inputs, simplifies to only handle environment setup with matrix values replaced by direct inputs

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

<<: *ci_setup
name: Codechecker
if: ${{ inputs.disable_phpcs != true }}
steps:
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The steps key at line 278 overrides the inherited steps from the YAML anchor *ci_setup, which includes downloading the canonical workspace artifact. This means the codechecker job won't have access to the workspace setup. The download step should be included in this job's steps array.

Suggested change
steps:
steps:
- name: Download canonical workspace
uses: actions/download-artifact@v3
with:
name: canonical-workspace
path: ${{ github.workspace }}

Copilot uses AI. Check for mistakes.
Comment on lines 287 to 288
steps:
- name: Run phplint
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The steps key overrides the inherited steps from the YAML anchor *ci_setup. The workspace download step needs to be included in this job's steps array to access the canonical workspace.

Copilot uses AI. Check for mistakes.
Comment on lines 296 to 297
steps:
- name: Run validate
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The steps key overrides the inherited steps from the YAML anchor *ci_setup. The workspace download step needs to be included in this job's steps array to access the canonical workspace.

Copilot uses AI. Check for mistakes.
Comment on lines 304 to 305
steps:
- name: Run savepoints
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The steps key overrides the inherited steps from the YAML anchor *ci_setup. The workspace download step needs to be included in this job's steps array to access the canonical workspace.

Copilot uses AI. Check for mistakes.
Comment on lines 348 to 349
steps:
- name: Run behat
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The steps key overrides the inherited steps from the YAML anchor *ci_setup. The workspace download step needs to be included in this job's steps array to access the canonical workspace.

Copilot uses AI. Check for mistakes.
Comment on lines 357 to 358
steps:
- name: Run phpdoc
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The steps key overrides the inherited steps from the YAML anchor *ci_setup. The workspace download step needs to be included in this job's steps array to access the canonical workspace.

Copilot uses AI. Check for mistakes.
Comment on lines 379 to 393
needs:
- pre_job
- prepare_matrix
- matrix
- setup-single
- codechecker
- phplint
- validate
- savepoints
- mustache
- grunt
- phpcpd
- phpmd
- behat
- phpdoc
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The release job requires all check jobs to complete successfully, but some of these jobs are conditionally skipped (e.g., phpmd only runs if enabled, codechecker/phplint/etc. only run if not disabled). If a job is skipped, GitHub Actions treats it as a failure for dependency purposes. Consider using if: always() conditions or needs with conditional success checks to handle optional jobs properly.

Copilot uses AI. Check for mistakes.
if: ${{ matrix.moodle-branch == 'MOODLE_32_STABLE' || matrix.moodle-branch == 'MOODLE_33_STABLE' }}
if: ${{ inputs.moodle_branch == 'MOODLE_32_STABLE' || inputs.moodle_branch == 'MOODLE_33_STABLE' }}
run: |
echo "::set-output name=COMPOSER_VERSION::--1"
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This uses the deprecated set-output command. Update to the newer syntax: echo \"COMPOSER_VERSION=--1\" >> $GITHUB_OUTPUT

Suggested change
echo "::set-output name=COMPOSER_VERSION::--1"
echo "COMPOSER_VERSION=--1" >> $GITHUB_OUTPUT

Copilot uses AI. Check for mistakes.
uses: actions/upload-artifact@v3
with:
name: canonical-workspace
path: ${{ github.workspace }}
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uploading the entire workspace as an artifact may be inefficient and could include unnecessary files. Consider uploading only the essential directories (e.g., moodle installation, plugin code) to reduce artifact size and improve upload/download times.

Suggested change
path: ${{ github.workspace }}
path: |
${{ github.workspace }}/moodle
${{ github.workspace }}/plugin

Copilot uses AI. Check for mistakes.
@jay-oswald jay-oswald requested a review from Copilot January 13, 2026 00:40
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 430 to 444
needs:
- pre_job
- prepare_matrix
- matrix
- setup-single
- codechecker
- phplint
- validate
- savepoints
- mustache
- grunt
- phpcpd
- phpmd
- behat
- phpdoc
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The release job now requires all check jobs to complete, but many of these jobs have conditional execution based on input flags. If a check is disabled, the release job will not run because the disabled job won't execute. These dependencies should be made conditional or use a pattern that allows the release job to proceed even when some checks are skipped.

Copilot uses AI. Check for mistakes.
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