Skip to content

feat: update actions#226

Open
Morgy93 wants to merge 10 commits into
mainfrom
update-actions
Open

feat: update actions#226
Morgy93 wants to merge 10 commits into
mainfrom
update-actions

Conversation

@Morgy93

@Morgy93 Morgy93 commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

This pull request introduces a reusable GitHub Action for setting up Magento in CI and refactors all workflows to use it, significantly simplifying and standardizing Magento provisioning across the project. It also adds concurrency controls to all workflows to prevent duplicate or superseded runs, and updates several actions to their latest versions for improved reliability and maintainability.

Reusable Magento Setup Action:

  • Added a new composite action at .github/actions/setup-magento to automate Magento provisioning (PHP/Composer setup, Composer cache, Magento fetch via Git or Mage-OS, and bin/magento setup:install), with configurable inputs for PHP/Magento versions and authentication.

Workflow Refactoring and Simplification:

  • Refactored the functional-tests, magento-compatibility, and static-analysis workflows to use the new setup-magento action, removing redundant steps for PHP/Composer setup, Magento download, and installation. [1] [2] [3]
  • Updated the test summary message in the compatibility workflow to include both Magento and PHP versions for clarity.

Concurrency and CI Efficiency:

  • Introduced concurrency groups and cancellation logic to all workflows (lint, phpcs, phpunit, label, release-please, functional-tests, magento-compatibility, static-analysis) to avoid wasted CI minutes by cancelling superseded runs, except for release automation which is serialized. [1] [2] [3] [4] [5] [6] [7] [8]

Dependency and Action Updates:

  • Updated all referenced actions (actions/checkout, actions/cache, actions/labeler, actions/setup-node, googleapis/release-please-action) to their latest stable versions with pinned SHAs for improved security and reliability. [1] [2] [3] [4] [5] [6]

CI Job Improvements:

  • Improved PHPCS workflow with a job name and ensured consistent artifact handling for lint findings, avoiding duplicate check runs and unnecessary permissions. [1] [2]

This refactor centralizes Magento setup logic, reduces duplication, and makes CI runs faster and more robust.

Copilot AI review requested due to automatic review settings July 10, 2026 06:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates GitHub Actions workflows to improve triggering control and keep pinned action versions up to date across CI checks.

Changes:

  • Restrict pull_request workflow triggers to PRs targeting main, and add workflow_dispatch for manual runs (PHPUnit/PHPCS/Lint/Functional Tests).
  • Update pinned actions/checkout / actions/cache SHAs (with version comments) in Magento compatibility and functional test workflows.
  • Adjust CI job metadata/output (add PHPCS job name; make Magento compatibility summary message reflect matrix values; remove checks: write from Trunk job permissions).

Reviewed changes

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

Show a summary per file
File Description
.github/workflows/phpunit.yml Adds pull_request base-branch filter and enables manual dispatch.
.github/workflows/phpcs.yml Adds pull_request base-branch filter/manual dispatch and sets an explicit job name.
.github/workflows/magento-compatibility.yml Updates action pins and improves the final summary message to include matrix values.
.github/workflows/lint.yml Adds pull_request base-branch filter/manual dispatch, updates pin comments, and removes checks: write for the Trunk job.
.github/workflows/functional-tests.yml Updates action pins to current versions with explicit version comments.

Copilot AI review requested due to automatic review settings July 10, 2026 06:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 9 out of 9 changed files in this pull request and generated 1 comment.

Comment thread .github/actions/setup-magento/action.yml Outdated
Copilot AI review requested due to automatic review settings July 10, 2026 07:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 9 out of 9 changed files in this pull request and generated 1 comment.

Comment thread .github/actions/setup-magento/action.yml Outdated
Copilot AI review requested due to automatic review settings July 10, 2026 07:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 9 out of 9 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/static-analysis.yml Outdated
Copilot AI review requested due to automatic review settings July 10, 2026 07:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 9 out of 9 changed files in this pull request and generated 2 comments.

Comment thread .github/actions/setup-magento/action.yml
Comment thread .github/actions/setup-magento/action.yml Outdated
Copilot AI review requested due to automatic review settings July 10, 2026 07:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 9 out of 9 changed files in this pull request and generated 2 comments.

Comment on lines +47 to +52
- name: Cache Composer packages
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ~/.composer/cache/files
key: ${{ runner.os }}-composer-${{ inputs.magento-version }}-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-${{ inputs.magento-version }}
Comment on lines +58 to +59
git clone --depth=1 --branch=${{ inputs.magento-version }} \
https://github.com/magento/magento2.git magento2
Copilot AI review requested due to automatic review settings July 10, 2026 08:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 10 out of 10 changed files in this pull request and generated 1 comment.

Comment thread .github/actions/setup-magento/action.yml
Copilot AI review requested due to automatic review settings July 10, 2026 08:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 10 out of 10 changed files in this pull request and generated 1 comment.

Comment on lines +109 to +112
$metadata = json_decode(html_entity_decode($matches[1], ENT_QUOTES), true);
$this->assertIsArray($metadata);

return $metadata;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants