feat: update actions#226
Open
Morgy93 wants to merge 10 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
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_requestworkflow triggers to PRs targetingmain, and addworkflow_dispatchfor manual runs (PHPUnit/PHPCS/Lint/Functional Tests). - Update pinned
actions/checkout/actions/cacheSHAs (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: writefrom 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. |
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 |
Comment on lines
+109
to
+112
| $metadata = json_decode(html_entity_decode($matches[1], ENT_QUOTES), true); | ||
| $this->assertIsArray($metadata); | ||
|
|
||
| return $metadata; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
.github/actions/setup-magentoto automate Magento provisioning (PHP/Composer setup, Composer cache, Magento fetch via Git or Mage-OS, andbin/magento setup:install), with configurable inputs for PHP/Magento versions and authentication.Workflow Refactoring and Simplification:
functional-tests,magento-compatibility, andstatic-analysisworkflows to use the newsetup-magentoaction, removing redundant steps for PHP/Composer setup, Magento download, and installation. [1] [2] [3]Concurrency and CI Efficiency:
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:
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:
This refactor centralizes Magento setup logic, reduces duplication, and makes CI runs faster and more robust.