Compare commits

...

21 Commits

Author SHA1 Message Date
Damien Retzinger a097371e37 feat(resolve-check-config): graphql smoke test opt-out by default 2026-05-31 21:26:17 -04:00
GrayBot 5ee0768610 chore: restore internal action refs to @main (#285) 2026-05-27 16:20:58 -04:00
GrayBot 3c51e99538 chore: release 8.5.0 (#284) 2026-05-27 16:18:40 -04:00
Damien Retzinger 32a5fd2bad feat(setup-install): run with --no-interaction 2026-05-27 15:39:46 -04:00
GrayBot 91bd008e62 chore: restore internal action refs to @main (#283) 2026-05-25 16:15:12 -04:00
GrayBot 36953b919c chore: release 8.4.0 (#282) 2026-05-25 16:14:12 -04:00
Damien Retzinger 83f9433da0 feat: remove rabbitmq from supported-version for mage-os/minimal 2026-05-25 16:09:31 -04:00
dependabot[bot] a7d48f567e build(deps): bump googleapis/release-please-action from 4 to 5 (#273)
Bumps [googleapis/release-please-action](https://github.com/googleapis/release-please-action) from 4 to 5.
- [Release notes](https://github.com/googleapis/release-please-action/releases)
- [Changelog](https://github.com/googleapis/release-please-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/googleapis/release-please-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: googleapis/release-please-action
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-25 09:34:12 -04:00
dependabot[bot] 76eb9064ff build(deps): bump actions/upload-artifact from 6 to 7 (#272)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6 to 7.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-25 09:34:00 -04:00
GrayBot 147245e120 chore: restore internal action refs to @main (#281) 2026-05-25 09:33:37 -04:00
GrayBot 4df4b25e05 chore: release 8.3.0 (#280) 2026-05-25 09:31:20 -04:00
Damien Retzinger fa8e597365 feat(check-store): use the project when computing underlying version requirements 2026-05-25 09:27:28 -04:00
Damien Retzinger 1ea5a10ef6 feat(get-magento-version): emit supported-version project name as an output 2026-05-25 09:26:33 -04:00
Damien Retzinger 863444afbd feat(get-magento-version): add support for MageOS minimal distro 2026-05-25 09:15:50 -04:00
Damien Retzinger befe0807f7 feat(supported-version): add support for MageOS Minimal edition 2026-05-25 09:11:52 -04:00
Marcel 1e63c019ed feat(supported-version): add support for MageOS 3
Co-authored-by: Damien Retzinger <damienwebdev@gmail.com>
2026-05-25 08:57:42 -04:00
GrayBot ebfdeb0b73 chore: restore internal action refs to @main (#271) 2026-05-17 19:18:30 -04:00
GrayBot 8a0f197a13 chore: release 8.2.0 (#270) 2026-05-17 19:17:32 -04:00
Damien Retzinger 0bf08ef692 feat(check-extension): allow configuraton via .github/check-extension.json (#269) 2026-05-17 19:09:18 -04:00
Damien Retzinger 35c1ace2bc feat(resolve-check-config): defined required integration test services required (#269) 2026-05-17 19:09:13 -04:00
GrayBot d07afbacd0 chore: restore internal action refs to @main (#268) 2026-05-17 18:02:52 -04:00
59 changed files with 643 additions and 171 deletions
+32 -15
View File
@@ -42,15 +42,28 @@ on:
description: "Your composer credentials (typically a stringified json object of the contents of your auth.json)"
jobs:
compute_resolved:
runs-on: ubuntu-latest
outputs:
resolved: ${{ steps.resolve.outputs.resolved }}
steps:
- uses: graycoreio/github-actions-magento2/resolve-check-config@main
id: resolve
with:
kind: extension
matrix: ${{ inputs.matrix }}
unit-test-extension:
runs-on: ${{ matrix.os }}
needs: compute_resolved
if: ${{ fromJSON(needs.compute_resolved.outputs.resolved)['unit-test-extension'].enabled != false }}
strategy:
matrix: ${{ fromJSON(inputs.matrix) }}
matrix: ${{ fromJSON(needs.compute_resolved.outputs.resolved)['unit-test-extension'].matrix }}
fail-fast: ${{ inputs.fail-fast }}
steps:
- uses: actions/checkout@v6
- uses: graycoreio/github-actions-magento2/setup-magento@v8.1.0
- uses: graycoreio/github-actions-magento2/setup-magento@main
id: setup-magento
with:
php-version: ${{ matrix.php }}
@@ -79,7 +92,7 @@ jobs:
env:
COMPOSER_AUTH: ${{ secrets.composer_auth }}
- uses: graycoreio/github-actions-magento2/cache-magento@v8.1.0
- uses: graycoreio/github-actions-magento2/cache-magento@main
with:
composer_cache_key: ${{ inputs.composer_cache_key && format('{0} | {1}', inputs.composer_cache_key, matrix.magento) || matrix.magento }}
working-directory: ${{ steps.setup-magento.outputs.path }}
@@ -113,13 +126,15 @@ jobs:
compile-extension:
runs-on: ${{ matrix.os }}
needs: compute_resolved
if: ${{ fromJSON(needs.compute_resolved.outputs.resolved)['compile-extension'].enabled != false }}
strategy:
matrix: ${{ fromJSON(inputs.matrix) }}
matrix: ${{ fromJSON(needs.compute_resolved.outputs.resolved)['compile-extension'].matrix }}
fail-fast: ${{ inputs.fail-fast }}
steps:
- uses: actions/checkout@v6
- uses: graycoreio/github-actions-magento2/setup-magento@v8.1.0
- uses: graycoreio/github-actions-magento2/setup-magento@main
id: setup-magento
with:
php-version: ${{ matrix.php }}
@@ -148,7 +163,7 @@ jobs:
env:
COMPOSER_AUTH: ${{ secrets.composer_auth }}
- uses: graycoreio/github-actions-magento2/cache-magento@v8.1.0
- uses: graycoreio/github-actions-magento2/cache-magento@main
with:
composer_cache_key: ${{ inputs.composer_cache_key && format('{0} | {1}', inputs.composer_cache_key, matrix.magento) || matrix.magento }}
working-directory: ${{ steps.setup-magento.outputs.path }}
@@ -161,7 +176,7 @@ jobs:
COMPOSER_AUTH: ${{ secrets.composer_auth }}
COMPOSER_MIRROR_PATH_REPOS: 1
- uses: graycoreio/github-actions-magento2/setup-di-compile@v8.1.0
- uses: graycoreio/github-actions-magento2/setup-di-compile@main
with:
path: ${{ steps.setup-magento.outputs.path }}
@@ -170,7 +185,7 @@ jobs:
outputs:
matrix: ${{ steps.supported-version.outputs.matrix }}
steps:
- uses: graycoreio/github-actions-magento2/supported-version@v8.1.0
- uses: graycoreio/github-actions-magento2/supported-version@main
id: supported-version
with:
kind: latest
@@ -190,25 +205,27 @@ jobs:
tools: composer:v${{ matrix.composer }}
coverage: none
- uses: graycoreio/github-actions-magento2/cache-magento@v8.1.0
- uses: graycoreio/github-actions-magento2/cache-magento@main
with:
composer_cache_key: ${{ inputs.composer_cache_key && format('{0} | {1}', inputs.composer_cache_key, matrix.magento) || matrix.magento }}
- uses: graycoreio/github-actions-magento2/coding-standard@v8.1.0
- uses: graycoreio/github-actions-magento2/coding-standard@main
with:
path: ${{ inputs.path }}
composer_auth: ${{ secrets.composer_auth }}
integration_test:
runs-on: ${{ matrix.os }}
needs: compute_resolved
if: ${{ fromJSON(needs.compute_resolved.outputs.resolved)['integration_test'].enabled != false }}
strategy:
matrix: ${{ fromJSON(inputs.matrix) }}
matrix: ${{ fromJSON(needs.compute_resolved.outputs.resolved)['integration_test'].matrix }}
fail-fast: ${{ inputs.fail-fast }}
services: ${{ matrix.services }}
steps:
- uses: actions/checkout@v6
- uses: graycoreio/github-actions-magento2/setup-magento@v8.1.0
- uses: graycoreio/github-actions-magento2/setup-magento@main
id: setup-magento
with:
php-version: ${{ matrix.php }}
@@ -237,7 +254,7 @@ jobs:
env:
COMPOSER_AUTH: ${{ secrets.composer_auth }}
- uses: graycoreio/github-actions-magento2/cache-magento@v8.1.0
- uses: graycoreio/github-actions-magento2/cache-magento@main
with:
composer_cache_key: ${{ inputs.composer_cache_key && format('{0} | {1}', inputs.composer_cache_key, matrix.magento) || matrix.magento }}
working-directory: ${{ steps.setup-magento.outputs.path }}
@@ -250,7 +267,7 @@ jobs:
COMPOSER_AUTH: ${{ secrets.composer_auth }}
COMPOSER_MIRROR_PATH_REPOS: 1
- uses: graycoreio/github-actions-magento2/get-magento-version@v8.1.0
- uses: graycoreio/github-actions-magento2/get-magento-version@main
id: magento-version
with:
working-directory: ${{ steps.setup-magento.outputs.path }}
@@ -284,7 +301,7 @@ jobs:
run: ../../../vendor/bin/phpunit -c phpunit.xml.dist --testsuite Extension_Integration_Tests
- name: Upload test sandbox dir
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@v7
if: failure()
with:
name: sandbox-data-${{ steps.magento-version.outputs.version }}
+20 -14
View File
@@ -46,18 +46,19 @@ jobs:
name: ${{ inputs.store_artifact_name }}
path: ${{ inputs.path }}
- uses: graycoreio/github-actions-magento2/get-magento-version@v8.1.0
- uses: graycoreio/github-actions-magento2/get-magento-version@main
id: get-magento-version
with:
working-directory: ${{ inputs.path }}
- uses: graycoreio/github-actions-magento2/supported-version@v8.1.0
- uses: graycoreio/github-actions-magento2/supported-version@main
id: supported-version
with:
project: ${{ steps.get-magento-version.outputs.supported_version_project }}
kind: custom
custom_versions: ${{ steps.get-magento-version.outputs.project }}:${{ fromJSON(steps.get-magento-version.outputs.version) }}
- uses: graycoreio/github-actions-magento2/resolve-check-config@v8.1.0
- uses: graycoreio/github-actions-magento2/resolve-check-config@main
id: resolve
with:
kind: store
@@ -80,7 +81,7 @@ jobs:
name: ${{ inputs.store_artifact_name }}
path: ${{ inputs.path }}
- uses: graycoreio/github-actions-magento2/setup-magento@v8.1.0
- uses: graycoreio/github-actions-magento2/setup-magento@main
id: setup-magento
with:
php-version: ${{ matrix.php }}
@@ -89,7 +90,7 @@ jobs:
working-directory: ${{ inputs.path }}
composer_auth: ${{ secrets.composer_auth }}
- uses: graycoreio/github-actions-magento2/cache-magento@v8.1.0
- uses: graycoreio/github-actions-magento2/cache-magento@main
with:
composer_cache_key: ${{ inputs.composer_cache_key }}
working-directory: ${{ steps.setup-magento.outputs.path }}
@@ -143,7 +144,7 @@ jobs:
name: ${{ inputs.store_artifact_name }}
path: ${{ inputs.path }}
- uses: graycoreio/github-actions-magento2/setup-magento@v8.1.0
- uses: graycoreio/github-actions-magento2/setup-magento@main
id: setup-magento
with:
php-version: ${{ matrix.php }}
@@ -152,7 +153,7 @@ jobs:
working-directory: ${{ inputs.path }}
composer_auth: ${{ secrets.composer_auth }}
- uses: graycoreio/github-actions-magento2/cache-magento@v8.1.0
- uses: graycoreio/github-actions-magento2/cache-magento@main
with:
composer_cache_key: ${{ inputs.composer_cache_key }}
working-directory: ${{ steps.setup-magento.outputs.path }}
@@ -177,7 +178,7 @@ jobs:
EOF
fi
- uses: graycoreio/github-actions-magento2/coding-standard@v8.1.0
- uses: graycoreio/github-actions-magento2/coding-standard@main
with:
path: ${{ steps.setup-magento.outputs.path }}
composer_auth: ${{ secrets.composer_auth }}
@@ -200,7 +201,7 @@ jobs:
name: ${{ inputs.store_artifact_name }}
path: ${{ inputs.path }}
- uses: graycoreio/github-actions-magento2/setup-magento@v8.1.0
- uses: graycoreio/github-actions-magento2/setup-magento@main
id: setup-magento
with:
php-version: ${{ matrix.php }}
@@ -209,7 +210,7 @@ jobs:
working-directory: ${{ inputs.path }}
composer_auth: ${{ secrets.composer_auth }}
- uses: graycoreio/github-actions-magento2/cache-magento@v8.1.0
- uses: graycoreio/github-actions-magento2/cache-magento@main
with:
composer_cache_key: ${{ inputs.composer_cache_key }}
working-directory: ${{ steps.setup-magento.outputs.path }}
@@ -221,7 +222,7 @@ jobs:
env:
COMPOSER_AUTH: ${{ secrets.composer_auth }}
- uses: graycoreio/github-actions-magento2/setup-install@v8.1.0
- uses: graycoreio/github-actions-magento2/setup-install@main
id: setup-install
with:
services: ${{ toJSON(matrix.services) }}
@@ -229,15 +230,20 @@ jobs:
container_id: ${{ job.services['php-fpm'].id }}
extra_args: --magento-init-params=MAGE_MODE=developer
- uses: graycoreio/github-actions-magento2/configure-service-nginx@v8.1.0
- uses: graycoreio/github-actions-magento2/configure-service-nginx@main
with:
container_id: ${{ job.services.nginx.id }}
magento_path: ${{ inputs.path }}
- uses: graycoreio/github-actions-magento2/smoke-test@v8.1.0
- uses: graycoreio/github-actions-magento2/smoke-test@main
if: contains(fromJSON(needs.compute_matrix.outputs.resolved)['smoke-test'].probes, 'page')
with:
kind: page
- uses: graycoreio/github-actions-magento2/smoke-test@v8.1.0
## graphql is opt-in: editions without GraphQL modules (e.g. mage-os
## minimal) have no /graphql endpoint. Enable it per store via
## `.github/check-store.json` -> jobs.smoke-test.probes: ["page", "graphql"].
- uses: graycoreio/github-actions-magento2/smoke-test@main
if: contains(fromJSON(needs.compute_matrix.outputs.resolved)['smoke-test'].probes, 'graphql')
with:
kind: graphql
+2 -2
View File
@@ -82,7 +82,7 @@ jobs:
COMPOSER_AUTH: ${{ secrets.composer_auth }}
name: Create Magento ${{ matrix.magento }} Project
- uses: graycoreio/github-actions-magento2/get-magento-version@v8.1.0
- uses: graycoreio/github-actions-magento2/get-magento-version@main
id: magento-version
with:
working-directory: ${{ inputs.magento_directory }}
@@ -182,7 +182,7 @@ jobs:
name: Run Integration Tests
- name: Upload test sandbox dir
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@v7
if: failure()
with:
name: sandbox-data-${{ steps.magento-version.outputs.version }}
+1 -1
View File
@@ -28,7 +28,7 @@ jobs:
releases_created: ${{ steps.release.outputs.releases_created }}
steps:
- id: release
uses: googleapis/release-please-action@v4
uses: googleapis/release-please-action@v5
with:
token: ${{ secrets.GRAYCORE_GITHUB_TOKEN }}
config-file: ${{ inputs.release-mode == 'rc' && 'release-please-config.rc.json' || (inputs.release-mode == 'graduate' && 'release-please-config.graduate.json' || 'release-please-config.json') }}
+1 -1
View File
@@ -1 +1 @@
{".":"8.1.0"}
{".":"8.5.0"}
+33
View File
@@ -2,6 +2,39 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [8.5.0](https://github.com/graycoreio/github-actions-magento2/compare/v8.4.0...v8.5.0) (2026-05-27)
### Features
* **setup-install:** run with --no-interaction ([32a5fd2](https://github.com/graycoreio/github-actions-magento2/commit/32a5fd2badfe558e7dced9606765d0d44632c6f0))
## [8.4.0](https://github.com/graycoreio/github-actions-magento2/compare/v8.3.0...v8.4.0) (2026-05-25)
### Features
* remove rabbitmq from supported-version for mage-os/minimal ([83f9433](https://github.com/graycoreio/github-actions-magento2/commit/83f9433da0d7f20efbf090fd8ed75a0a39000797))
## [8.3.0](https://github.com/graycoreio/github-actions-magento2/compare/v8.2.0...v8.3.0) (2026-05-25)
### Features
* **check-store:** use the project when computing underlying version requirements ([fa8e597](https://github.com/graycoreio/github-actions-magento2/commit/fa8e59736563d5969f5c8ebaccd23c48f0628721))
* **get-magento-version:** add support for MageOS minimal distro ([863444a](https://github.com/graycoreio/github-actions-magento2/commit/863444afbd137d32157392b964f06503f021ee6c))
* **get-magento-version:** emit supported-version project name as an output ([1ea5a10](https://github.com/graycoreio/github-actions-magento2/commit/1ea5a10ef67d6fda8d10e078895adc9bea434477))
* **supported-version:** add support for MageOS 3 ([1e63c01](https://github.com/graycoreio/github-actions-magento2/commit/1e63c019edb63ee0bcd4576b4125b73520ca8864))
* **supported-version:** add support for MageOS Minimal edition ([befe080](https://github.com/graycoreio/github-actions-magento2/commit/befe0807f7636c125d7e650f2d08012b28554a54))
## [8.2.0](https://github.com/graycoreio/github-actions-magento2/compare/v8.1.0...v8.2.0) (2026-05-17)
### Features
* **check-extension:** allow configuraton via .github/check-extension.json ([#269](https://github.com/graycoreio/github-actions-magento2/issues/269)) ([0bf08ef](https://github.com/graycoreio/github-actions-magento2/commit/0bf08ef69291090e5fe3e3d47cb432c6c9107f30))
* **resolve-check-config:** defined required integration test services required ([#269](https://github.com/graycoreio/github-actions-magento2/issues/269)) ([35c1ace](https://github.com/graycoreio/github-actions-magento2/commit/35c1ace2bc68be1356dc6565a8a05ff02e33d75d))
## [8.1.0](https://github.com/graycoreio/github-actions-magento2/compare/v8.0.0...v8.1.0) (2026-05-17)
+4 -4
View File
@@ -33,7 +33,7 @@ The `composer.lock` hash is derived from `working-directory/composer.lock` using
### Extension (download cache only)
```yml
- uses: graycoreio/github-actions-magento2/cache-magento@v8.1.0 # x-release-please-version
- uses: graycoreio/github-actions-magento2/cache-magento@v8.5.0 # x-release-please-version
with:
composer_cache_key: ${{ inputs.composer_cache_key }}
```
@@ -41,13 +41,13 @@ The `composer.lock` hash is derived from `working-directory/composer.lock` using
### Extension or store (download + vendor stamp cache)
```yml
- uses: graycoreio/github-actions-magento2/setup-magento@v8.1.0 # x-release-please-version
- uses: graycoreio/github-actions-magento2/setup-magento@v8.5.0 # x-release-please-version
id: setup-magento
with:
mode: extension # or store
# ...
- uses: graycoreio/github-actions-magento2/cache-magento@v8.1.0 # x-release-please-version
- uses: graycoreio/github-actions-magento2/cache-magento@v8.5.0 # x-release-please-version
with:
composer_cache_key: ${{ inputs.composer_cache_key }}
working-directory: ${{ steps.setup-magento.outputs.path }}
@@ -69,7 +69,7 @@ As such, use `stamp: true` when `composer.lock` is stable across most runs — a
> **Dependabot / Renovate:** Each time a Dependabot or Renovate PR is merged, the remaining open PRs rebase and each produces a new `composer.lock`. This cascades into a large number of unique cache entries, inflating storage costs without delivering proportional compute savings — because automated PRs are not waiting on fast feedback. The fix is to disable stamp caching for automated dependency PRs entirely:
>
> ```yml
> - uses: graycoreio/github-actions-magento2/cache-magento@v8.1.0 # x-release-please-version
> - uses: graycoreio/github-actions-magento2/cache-magento@v8.5.0 # x-release-please-version
> with:
> stamp: ${{ github.actor != 'dependabot[bot]' }}
> ```
+1 -1
View File
@@ -62,7 +62,7 @@ runs:
exit 1
fi
- uses: graycoreio/github-actions-magento2/get-magento-version@v8.1.0
- uses: graycoreio/github-actions-magento2/get-magento-version@main
id: cache-magento-get-magento-version
with:
working-directory: ${{ inputs.working-directory }}
+1 -1
View File
@@ -36,7 +36,7 @@ jobs:
tools: composer:v2
coverage: none
- uses: graycoreio/github-actions-magento2/coding-standard@v8.1.0 # x-release-please-version
- uses: graycoreio/github-actions-magento2/coding-standard@v8.5.0 # x-release-please-version
with:
path: app/code # Optional, defaults to .
version: 25 # Optional, will use the latest if omitted.
+2 -2
View File
@@ -52,12 +52,12 @@ runs:
fi
- name: Get Composer Version
uses: graycoreio/github-actions-magento2/get-composer-version@v8.1.0
uses: graycoreio/github-actions-magento2/get-composer-version@main
id: get-composer-version
if: steps.check-installed.outputs.installed != 'true'
- name: Check if allow-plugins option is available for this version of composer
uses: graycoreio/github-actions-magento2/semver-compare@v8.1.0
uses: graycoreio/github-actions-magento2/semver-compare@main
id: is-allow-plugins-available
if: steps.check-installed.outputs.installed != 'true'
with:
+19 -2
View File
@@ -18,6 +18,23 @@ See the [check-extension.yaml](../../.github/workflows/check-extension.yaml)
The Magento matrix format outlined by the [supported versions action.](https://github.com/graycoreio/github-actions-magento2/tree/main/supported-version/supported.json)
## Configuration
Each check can be toggled on/off through an optional `.github/check-extension.json` file in the repo that calls this workflow.
You can learn more about this file here in the [`resolve-check-config` action.](../../resolve-check-config/README.md):
Reference the published JSON Schema with `$schema` to get autocompletion and inline validation in editors that support it — see [`check-extension.schema.json`](../../resolve-check-config/check-extension.schema.json):
```json
{
"$schema": "https://raw.githubusercontent.com/graycoreio/github-actions-magento2/main/resolve-check-config/check-extension.schema.json",
"jobs": {
"integration_test": false
}
}
```
## Usage
```yml
@@ -38,12 +55,12 @@ jobs:
matrix: ${{ steps.supported-version.outputs.matrix }}
steps:
- uses: actions/checkout@v6
- uses: graycoreio/github-actions-magento2/supported-version@v8.1.0 # x-release-please-version
- uses: graycoreio/github-actions-magento2/supported-version@v8.5.0 # x-release-please-version
id: supported-version
- run: echo ${{ steps.supported-version.outputs.matrix }}
check-extension:
needs: compute_matrix
uses: graycoreio/github-actions-magento2/.github/workflows/check-extension.yaml@v8.1.0 # x-release-please-version
uses: graycoreio/github-actions-magento2/.github/workflows/check-extension.yaml@v8.5.0 # x-release-please-version
with:
matrix: ${{ needs.compute_matrix.outputs.matrix }}
```
+3 -3
View File
@@ -32,7 +32,7 @@ Each check can be toggled on/off through an optional `.github/check-store.json`
You can learn more about this file here in the [`resolve-check-config` action.](../../resolve-check-config/README.md):
Reference the published JSON Schema with `$schema` to get autocompletion and inline validation in editors that support it:
Reference the published JSON Schema with `$schema` to get autocompletion and inline validation in editors that support it — see [`check-store.schema.json`](../../resolve-check-config/check-store.schema.json):
```json
{
@@ -58,7 +58,7 @@ on:
jobs:
check-store:
uses: graycoreio/github-actions-magento2/.github/workflows/check-store.yaml@v8.1.0 # x-release-please-version
uses: graycoreio/github-actions-magento2/.github/workflows/check-store.yaml@v8.5.0 # x-release-please-version
secrets:
composer_auth: ${{ secrets.COMPOSER_AUTH }}
```
@@ -70,7 +70,7 @@ If your pipeline builds or prepares the store in a prior job and uploads it as a
```yml
jobs:
check-store:
uses: graycoreio/github-actions-magento2/.github/workflows/check-store.yaml@v8.1.0 # x-release-please-version
uses: graycoreio/github-actions-magento2/.github/workflows/check-store.yaml@v8.5.0 # x-release-please-version
secrets:
composer_auth: ${{ secrets.COMPOSER_AUTH }}
```
+2 -2
View File
@@ -50,13 +50,13 @@ jobs:
matrix: ${{ steps.supported-version.outputs.matrix }}
steps:
- uses: actions/checkout@v6
- uses: graycoreio/github-actions-magento2/supported-version@v8.1.0 # x-release-please-version
- uses: graycoreio/github-actions-magento2/supported-version@v8.5.0 # x-release-please-version
with:
include_services: true
id: supported-version
integration-workflow:
needs: compute_matrix
uses: graycoreio/github-actions-magento2/.github/workflows/integration.yaml@v8.1.0 # x-release-please-version
uses: graycoreio/github-actions-magento2/.github/workflows/integration.yaml@v8.5.0 # x-release-please-version
with:
package_name: my-vendor/package
matrix: ${{ needs.compute_matrix.outputs.matrix }}
+1 -1
View File
@@ -26,7 +26,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: graycoreio/github-actions-magento2/fix-magento-install@v8.1.0 # x-release-please-version
- uses: graycoreio/github-actions-magento2/fix-magento-install@v8.5.0 # x-release-please-version
with:
magento_directory: path/to/magento
```
+1 -1
View File
@@ -9,7 +9,7 @@ inputs:
runs:
using: "composite"
steps:
- uses: graycoreio/github-actions-magento2/get-magento-version@v8.1.0
- uses: graycoreio/github-actions-magento2/get-magento-version@main
id: init-magento-get-magento-version
with:
working-directory: ${{ inputs.magento_directory }}
+1 -1
View File
@@ -25,7 +25,7 @@ jobs:
name: A job to compute an installed Composer version.
steps:
- uses: actions/checkout@v6
- uses: graycoreio/github-actions-magento2/get-composer-version@v8.1.0 # x-release-please-version
- uses: graycoreio/github-actions-magento2/get-composer-version@v8.5.0 # x-release-please-version
id: get-composer-version
- run: echo version ${{ steps.get-composer-version.outputs.version }}
shell: bash
+1 -1
View File
@@ -25,7 +25,7 @@ jobs:
name: A job to compute an installed Magento version.
steps:
- uses: actions/checkout@v6
- uses: graycoreio/github-actions-magento2/get-magento-version@v8.1.0 # x-release-please-version
- uses: graycoreio/github-actions-magento2/get-magento-version@v8.5.0 # x-release-please-version
id: get-magento-version
- run: echo version ${{ steps.get-magento-version.outputs.version }}
shell: bash
+3
View File
@@ -15,6 +15,9 @@ outputs:
project:
description: 'The Magento project package name (e.g. magento/project-community-edition)'
value: ${{ steps.get-magento-version.outputs.project }}
supported_version_project:
description: 'The `project` value to pass to the supported-version action (e.g. `magento-open-source`, `mage-os`, `mage-os-minimal`). Empty when no Magento project is detected.'
value: ${{ steps.get-magento-version.outputs.supported_version_project }}
runs:
using: "composite"
@@ -0,0 +1,9 @@
{
"packages": [
{
"name": "mage-os/product-minimal-edition",
"version": "3.0.0"
}
],
"packages-dev": []
}
+9 -1
View File
@@ -2,7 +2,7 @@
set -uo pipefail
WORKING_DIR="${1:-.}"
PATTERN="magento/product-(community|enterprise)-edition|mage-os/product-community-edition"
PATTERN="magento/product-(community|enterprise)-edition|mage-os/product-(community|minimal)-edition"
cd "$WORKING_DIR"
@@ -16,5 +16,13 @@ PRODUCT=$(echo "${RESULT:-}" | awk '{print $1}')
VERSION=$(echo "${RESULT:-}" | awk '{print $2}' | sed 's/^v//')
PROJECT=$(echo "$PRODUCT" | sed 's/product-/project-/')
case "$PROJECT" in
magento/*) SUPPORTED_VERSION_PROJECT="magento-open-source" ;;
mage-os/project-community-edition) SUPPORTED_VERSION_PROJECT="mage-os" ;;
mage-os/project-minimal-edition) SUPPORTED_VERSION_PROJECT="mage-os-minimal" ;;
*) SUPPORTED_VERSION_PROJECT="" ;;
esac
echo "version=\"$VERSION\""
echo "project=$PROJECT"
echo "supported_version_project=$SUPPORTED_VERSION_PROJECT"
+11
View File
@@ -26,6 +26,7 @@ field() {
OUT=$(bash "$SCRIPT" "$FIXTURES/store-lock")
assert_eq "store lock: version" '"2.4.7"' "$(field "$OUT" version)"
assert_eq "store lock: project" "magento/project-community-edition" "$(field "$OUT" project)"
assert_eq "store lock: supported_version_project" "magento-open-source" "$(field "$OUT" supported_version_project)"
OUT=$(bash "$SCRIPT" "$FIXTURES/store-v-prefix")
assert_eq "store v-prefix: version" '"2.4.6"' "$(field "$OUT" version)"
@@ -33,22 +34,32 @@ assert_eq "store v-prefix: version" '"2.4.6"' "$(field "$OUT" version)"
OUT=$(bash "$SCRIPT" "$FIXTURES/enterprise")
assert_eq "enterprise: version" '"2.4.7-p1"' "$(field "$OUT" version)"
assert_eq "enterprise: project" "magento/project-enterprise-edition" "$(field "$OUT" project)"
assert_eq "enterprise: supported_version_project" "magento-open-source" "$(field "$OUT" supported_version_project)"
OUT=$(bash "$SCRIPT" "$FIXTURES/mage-os")
assert_eq "mage-os: version" '"1.0.0"' "$(field "$OUT" version)"
assert_eq "mage-os: project" "mage-os/project-community-edition" "$(field "$OUT" project)"
assert_eq "mage-os: supported_version_project" "mage-os" "$(field "$OUT" supported_version_project)"
OUT=$(bash "$SCRIPT" "$FIXTURES/mage-os-minimal")
assert_eq "mage-os-minimal: version" '"3.0.0"' "$(field "$OUT" version)"
assert_eq "mage-os-minimal: project" "mage-os/project-minimal-edition" "$(field "$OUT" project)"
assert_eq "mage-os-minimal: supported_version_project" "mage-os-minimal" "$(field "$OUT" supported_version_project)"
OUT=$(bash "$SCRIPT" "$FIXTURES/store-json")
assert_eq "store json: version" '"2.4.6-p1"' "$(field "$OUT" version)"
assert_eq "store json: project" "magento/project-community-edition" "$(field "$OUT" project)"
assert_eq "store json: supported_version_project" "magento-open-source" "$(field "$OUT" supported_version_project)"
OUT=$(bash "$SCRIPT" "$FIXTURES/extension")
assert_eq "extension: version" '""' "$(field "$OUT" version)"
assert_eq "extension: project" "" "$(field "$OUT" project)"
assert_eq "extension: supported_version_project" "" "$(field "$OUT" supported_version_project)"
OUT=$(bash "$SCRIPT" "$FIXTURES/empty")
assert_eq "empty dir: version" '""' "$(field "$OUT" version)"
assert_eq "empty dir: project" "" "$(field "$OUT" project)"
assert_eq "empty dir: supported_version_project" "" "$(field "$OUT" supported_version_project)"
echo ""
echo "$PASS passed, $FAIL failed"
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "@graycoreio/github-actions-magento2",
"version": "8.1.0",
"version": "8.5.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@graycoreio/github-actions-magento2",
"version": "8.1.0",
"version": "8.5.0",
"license": "MIT",
"dependencies": {
"@actions/core": "^1.11.1",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@graycoreio/github-actions-magento2",
"version": "8.1.0",
"version": "8.5.0",
"description": "Github Actions for Magento 2",
"scripts": {
"test": "cd supported-version && npm run test && cd - && cd setup-install && npm run test && cd -",
+9 -2
View File
@@ -4,6 +4,13 @@ Reads `.github/check-<kind>.json` (or a path you specify), validates job names a
A missing config file is fine — every known job is emitted with its default tier list.
## Schemas
Reference the published JSON Schema from your config's `$schema` key for autocompletion and inline validation in editors that support it:
- [`check-store.schema.json`](./check-store.schema.json) — config for the [MageCheck Store](../docs/workflows/check-store.md) workflow
- [`check-extension.schema.json`](./check-extension.schema.json) — config for the [MageCheck Extension](../docs/workflows/check-extension.md) workflow
## Inputs
| Input | Description | Required | Default |
@@ -21,12 +28,12 @@ jobs:
outputs:
resolved: ${{ steps.resolve.outputs.resolved }}
steps:
- uses: graycoreio/github-actions-magento2/supported-version@v8.1.0 # x-release-please-version
- uses: graycoreio/github-actions-magento2/supported-version@v8.5.0 # x-release-please-version
id: supported-version
with:
kind: currently-supported
- uses: graycoreio/github-actions-magento2/resolve-check-config@v8.1.0 # x-release-please-version
- uses: graycoreio/github-actions-magento2/resolve-check-config@v8.5.0 # x-release-please-version
id: resolve
with:
kind: store
+24 -1
View File
@@ -11,7 +11,7 @@
"properties": {
"unit-test": { "$ref": "#/$defs/jobConfig" },
"coding-standard": { "$ref": "#/$defs/jobConfig" },
"smoke-test": { "$ref": "#/$defs/jobConfig" }
"smoke-test": { "$ref": "#/$defs/smokeJobConfig" }
},
"additionalProperties": false
}
@@ -34,6 +34,29 @@
"additionalProperties": true
}
]
},
"smokeJobConfig": {
"description": "How the smoke-test job should be configured. Boolean form is shorthand for { enabled: <bool> }; object form adds a `probes` list on top of `enabled`.",
"oneOf": [
{ "type": "boolean" },
{
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"description": "Whether the job should run. Defaults to true when the key is present.",
"default": true
},
"probes": {
"type": "array",
"description": "Which smoke-test probes to run. Defaults to [\"page\"]. Add \"graphql\" to also probe the GraphQL endpoint — only for editions that ship GraphQL modules (the mage-os minimal edition does not, so /graphql 404s there).",
"items": { "enum": ["page", "graphql"] },
"default": ["page"]
}
},
"additionalProperties": true
}
]
}
}
}
+20 -20
View File
File diff suppressed because one or more lines are too long
@@ -1,14 +1,17 @@
import { EXTENSION_JOBS, KNOWN_JOBS_EXTENSION, resolveExtensionConfig } from './extension';
import { Matrix } from '../types';
const MATRIX: Matrix = {
include: [{
php: '8.3',
services: {
const FULL_SERVICES = {
mysql: { image: 'mysql:8' },
opensearch: { image: 'opensearchproject/opensearch:2' },
},
}],
rabbitmq: { image: 'rabbitmq:3' },
valkey: { image: 'valkey:8' },
nginx: { image: 'nginx:1.27' },
'php-fpm': { image: 'php:8.3-fpm' },
};
const MATRIX: Matrix = {
include: [{ php: '8.3', services: { ...FULL_SERVICES } }],
};
describe('EXTENSION_JOBS', () => {
@@ -24,6 +27,23 @@ describe('EXTENSION_JOBS', () => {
it('keeps KNOWN_JOBS_EXTENSION in sync with the map keys', () => {
expect([...KNOWN_JOBS_EXTENSION].sort()).toEqual(Object.keys(EXTENSION_JOBS).sort());
});
it('declares integration_test required tiers (no web)', () => {
expect(EXTENSION_JOBS['integration_test'].services).toEqual([]);
expect([...EXTENSION_JOBS['integration_test'].requiredServices!].sort()).toEqual([
'cache',
'db',
'queue',
'search',
]);
});
it('leaves the non-service jobs with empty defaults', () => {
for (const name of ['unit-test-extension', 'compile-extension', 'coding-standard']) {
expect(EXTENSION_JOBS[name].services).toEqual([]);
expect(EXTENSION_JOBS[name].requiredServices).toBeUndefined();
}
});
});
describe('resolveExtensionConfig', () => {
@@ -37,19 +57,34 @@ describe('resolveExtensionConfig', () => {
]);
});
it('emits services={} for every job under the current defaults', () => {
it('emits services={} for the non-service jobs', () => {
const resolved = resolveExtensionConfig({}, MATRIX);
for (const name of Object.keys(resolved)) {
for (const name of ['unit-test-extension', 'compile-extension', 'coding-standard']) {
expect(resolved[name].matrix.include[0].services).toEqual({});
}
});
it('still accepts a caller-supplied services override', () => {
it('integration_test includes mysql/search/queue/cache but NOT nginx/php-fpm', () => {
const resolved = resolveExtensionConfig({}, MATRIX);
expect(Object.keys(resolved['integration_test'].matrix.include[0].services!).sort()).toEqual([
'mysql',
'opensearch',
'rabbitmq',
'valkey',
]);
});
it('keeps integration_test required tiers even when caller overrides services to []', () => {
const resolved = resolveExtensionConfig(
{ jobs: { integration_test: { services: ['search'] } } },
{ jobs: { integration_test: { services: [] } } },
MATRIX,
);
expect(Object.keys(resolved['integration_test'].matrix.include[0].services!)).toEqual(['opensearch']);
expect(Object.keys(resolved['integration_test'].matrix.include[0].services!).sort()).toEqual([
'mysql',
'opensearch',
'rabbitmq',
'valkey',
]);
});
it('throws on a typo in the job name', () => {
+4 -1
View File
@@ -12,7 +12,10 @@ export const EXTENSION_JOBS: Record<string, JobDefaults> = {
'unit-test-extension': { services: [] },
'compile-extension': { services: [] },
'coding-standard': { services: [] },
'integration_test': { services: [] },
'integration_test': {
services: [],
requiredServices: ['db', 'search', 'queue', 'cache'],
},
};
export const KNOWN_JOBS_EXTENSION: readonly string[] = Object.keys(EXTENSION_JOBS);
@@ -31,6 +31,10 @@ describe('STORE_JOBS', () => {
]);
});
it('defaults smoke-test to the page probe only (graphql is opt-in)', () => {
expect(STORE_JOBS['smoke-test'].probes).toEqual(['page']);
});
it('exposes empty service defaults for unit-test and coding-standard', () => {
expect(STORE_JOBS['unit-test'].services).toEqual([]);
expect(STORE_JOBS['coding-standard'].services).toEqual([]);
@@ -79,6 +83,31 @@ describe('resolveStoreConfig', () => {
expect(resolved['smoke-test'].enabled).toBe(false);
});
it('emits the default page-only probe list for smoke-test', () => {
const resolved = resolveStoreConfig({}, MATRIX);
expect(resolved['smoke-test'].probes).toEqual(['page']);
});
it('honors a smoke-test probes override', () => {
const resolved = resolveStoreConfig(
{ jobs: { 'smoke-test': { probes: ['page', 'graphql'] } } },
MATRIX,
);
expect(resolved['smoke-test'].probes).toEqual(['page', 'graphql']);
});
it('does not emit probes on jobs without a probe concept', () => {
const resolved = resolveStoreConfig({}, MATRIX);
expect(resolved['unit-test'].probes).toBeUndefined();
expect(resolved['coding-standard'].probes).toBeUndefined();
});
it('rejects probes on a job that does not support it', () => {
expect(() => resolveStoreConfig({ jobs: { 'unit-test': { probes: ['page'] } } }, MATRIX)).toThrowError(
/job "unit-test" does not support "probes"/
);
});
it('throws on a typo in the job name', () => {
expect(() => resolveStoreConfig({ jobs: { 'smkoe-test': false } }, MATRIX)).toThrowError(
/unknown job "smkoe-test" for kind "store"/
+1
View File
@@ -14,6 +14,7 @@ export const STORE_JOBS: Record<string, JobDefaults> = {
'smoke-test': {
services: [],
requiredServices: ['db', 'search', 'queue', 'cache', 'web'],
probes: ['page'],
},
};
+62
View File
@@ -3,6 +3,7 @@ import {
filterMatrixForJob,
mergeRequiredTiers,
normalizeJobEntry,
normalizeProbes,
parseMatrixInput,
parseRawConfig,
resolveJobs,
@@ -24,6 +25,7 @@ const MATRIX: Matrix = {
const noDefaults: JobDefaults = { services: [] };
const smokeDefaults: JobDefaults = { services: ['search', 'queue', 'cache', 'web'] };
const probeDefaults: JobDefaults = { services: [], probes: ['page'] };
describe('normalizeJobEntry', () => {
it('defaults enabled=true and uses the default tiers when entry is undefined', () => {
@@ -96,6 +98,66 @@ describe('normalizeJobEntry', () => {
/services contains unknown tier "llm"/
);
});
it('carries the default probes when the entry omits them', () => {
expect(normalizeJobEntry('smoke-test', { services: [] }, probeDefaults)).toEqual({
enabled: true,
tiers: [],
probes: ['page'],
});
});
it('carries the default probes for the boolean shorthand', () => {
expect(normalizeJobEntry('smoke-test', true, probeDefaults)).toEqual({
enabled: true,
tiers: [],
probes: ['page'],
});
});
it('overrides the default probes when probes is set', () => {
expect(normalizeJobEntry('smoke-test', { probes: ['page', 'graphql'] }, probeDefaults)).toEqual({
enabled: true,
tiers: [],
probes: ['page', 'graphql'],
});
});
it('omits probes for a job that declares no probe defaults', () => {
expect(normalizeJobEntry('unit-test', { services: [] }, noDefaults).probes).toBeUndefined();
});
});
describe('normalizeProbes', () => {
it('returns the defaults when probes is omitted', () => {
expect(normalizeProbes('smoke-test', undefined, ['page'])).toEqual(['page']);
});
it('returns undefined for a job with no probe defaults when omitted', () => {
expect(normalizeProbes('unit-test', undefined, undefined)).toBeUndefined();
});
it('throws when probes is set on a job that does not support it', () => {
expect(() => normalizeProbes('unit-test', ['page'], undefined)).toThrowError(
/job "unit-test" does not support "probes"/
);
});
it('throws when probes is not an array', () => {
expect(() => normalizeProbes('smoke-test', 'page', ['page'])).toThrowError(
/probes must be an array of probe names/
);
});
it('throws when probes contains an unknown probe', () => {
expect(() => normalizeProbes('smoke-test', ['rest'], ['page'])).toThrowError(
/probes contains unknown probe "rest"/
);
});
it('accepts an empty probes array', () => {
expect(normalizeProbes('smoke-test', [], ['page'])).toEqual([]);
});
});
describe('mergeRequiredTiers', () => {
+51 -14
View File
@@ -1,34 +1,67 @@
import { JobDefaults, Kind, Matrix, MatrixEntry, RawConfig, RawJobConfig, ResolvedConfig, ResolvedJobConfig, Services } from './types';
import { isTier, servicesForTiers, Tier } from './tier-map';
import { isProbe, Probe } from './probe';
/**
* Normalizes a single raw job entry to (enabled, tiers). Accepts
* the boolean shorthand and the object form. Validates the shape
* and the `services` tier list; throws on unexpected input. The
* caller supplies the per-job default tiers, used when `services`
* is omitted from the entry.
* Normalizes the `probes` value from a job entry. Returns the
* caller's list when present (validated), the job's default probe
* list when omitted, or `undefined` for jobs that have no probe
* concept. Throws if a job without probe defaults is given `probes`.
*/
export const normalizeProbes = (
jobName: string,
raw: unknown,
defaults: readonly Probe[] | undefined,
): readonly Probe[] | undefined => {
if (raw === undefined) {
return defaults;
}
if (defaults === undefined) {
throw new Error(`check-config: job "${jobName}" does not support "probes"`);
}
if (!Array.isArray(raw)) {
throw new Error(`check-config: job "${jobName}".probes must be an array of probe names`);
}
const probes: Probe[] = [];
for (const value of raw) {
if (!isProbe(value)) {
throw new Error(`check-config: job "${jobName}".probes contains unknown probe "${String(value)}"`);
}
probes.push(value);
}
return probes;
}
/**
* Normalizes a single raw job entry to (enabled, tiers, probes).
* Accepts the boolean shorthand and the object form. Validates the
* shape, the `services` tier list, and the `probes` list; throws on
* unexpected input. The caller supplies the per-job defaults, used
* when `services`/`probes` are omitted from the entry. `probes` is
* `undefined` for jobs that declare no probe defaults.
*/
export const normalizeJobEntry = (
jobName: string,
raw: RawJobConfig | undefined,
defaults: JobDefaults,
): { enabled: boolean; tiers: readonly Tier[] } => {
): { enabled: boolean; tiers: readonly Tier[]; probes?: readonly Probe[] } => {
if (raw === undefined) {
return { enabled: true, tiers: defaults.services };
return { enabled: true, tiers: defaults.services, probes: defaults.probes };
}
if (typeof raw === 'boolean') {
return { enabled: raw, tiers: defaults.services };
return { enabled: raw, tiers: defaults.services, probes: defaults.probes };
}
if (raw === null || typeof raw !== 'object' || Array.isArray(raw)) {
throw new Error(
`check-config: job "${jobName}" must be a boolean or an object (got ${Array.isArray(raw) ? 'array' : typeof raw})`
);
}
const { enabled, services } = raw as { enabled?: unknown; services?: unknown };
const { enabled, services, probes } = raw as { enabled?: unknown; services?: unknown; probes?: unknown };
const enabledValue = enabled === undefined ? true : Boolean(enabled);
const resolvedProbes = normalizeProbes(jobName, probes, defaults.probes);
if (services === undefined) {
return { enabled: enabledValue, tiers: defaults.services };
return { enabled: enabledValue, tiers: defaults.services, probes: resolvedProbes };
}
if (!Array.isArray(services)) {
throw new Error(`check-config: job "${jobName}".services must be an array of tier names`);
@@ -40,7 +73,7 @@ export const normalizeJobEntry = (
}
tiers.push(value);
}
return { enabled: enabledValue, tiers };
return { enabled: enabledValue, tiers, probes: resolvedProbes };
}
/**
@@ -117,12 +150,16 @@ export const resolveJobs = (
const resolved: ResolvedConfig = {};
for (const [name, defaults] of Object.entries(jobs)) {
const entry = (rawJobs as Record<string, RawJobConfig>)[name];
const { enabled, tiers } = normalizeJobEntry(name, entry, defaults);
const { enabled, tiers, probes } = normalizeJobEntry(name, entry, defaults);
const finalTiers = mergeRequiredTiers(tiers, defaults.requiredServices);
resolved[name] = {
const resolvedEntry: ResolvedJobConfig = {
enabled,
matrix: filterMatrixForJob(matrix, finalTiers),
} as ResolvedJobConfig;
};
if (probes !== undefined) {
resolvedEntry.probes = [...probes];
}
resolved[name] = resolvedEntry;
}
return resolved;
}
+13
View File
@@ -0,0 +1,13 @@
/**
* A smoke-test probe the check-store workflow can run against a
* running store. `page` does a GET / and asserts a non-empty title;
* `graphql` POSTs a storeConfig query to /graphql. Probes are opt-in
* per job because not every edition exposes every surface (e.g. the
* mage-os minimal edition ships no GraphQL modules, so /graphql 404s).
*/
export const PROBES = ['page', 'graphql'] as const;
export type Probe = (typeof PROBES)[number];
export const isProbe = (value: unknown): value is Probe =>
typeof value === 'string' && (PROBES as readonly string[]).includes(value);
+10 -2
View File
@@ -1,4 +1,5 @@
import { Tier } from './tier-map';
import { Probe } from './probe';
/**
* Which reusable workflow a config belongs to. Selects the known-job
@@ -53,10 +54,15 @@ export interface Matrix {
* regardless of caller overrides. Use it for tiers a job structurally
* cannot run without (e.g. mysql for a running store smoke-test) and
* which therefore should not appear in the user-facing schema enum.
*
* `probes` is the default smoke-test probe list used when the caller
* does not override it. Only jobs that declare it support the
* `probes` config key; omit it for jobs that have no probe concept.
*/
export interface JobDefaults {
services: readonly Tier[];
requiredServices?: readonly Tier[];
probes?: readonly Probe[];
}
/**
@@ -67,6 +73,7 @@ export interface JobDefaults {
export interface ResolvedJobConfig {
enabled: boolean;
matrix: Matrix;
probes?: Probe[];
[key: string]: unknown;
}
@@ -83,11 +90,12 @@ export interface ResolvedConfig {
* Shape of a single per-job entry in the user's JSON config file.
* - `true` / `false`: shorthand for `{ enabled: true|false }`
* - object: explicit enabled flag plus an optional tier list under
* `services` (validated against the per-kind schema).
* `services` and an optional probe list under `probes` (both
* validated against the per-kind schema).
*/
export type RawJobConfig =
| boolean
| { enabled?: boolean; services?: string[]; [key: string]: unknown };
| { enabled?: boolean; services?: string[]; probes?: string[]; [key: string]: unknown };
/**
* Top-level shape of the user's JSON config file. Job toggles live
+1 -1
View File
@@ -28,7 +28,7 @@ jobs:
steps:
- uses: actions/checkout@v6
- uses: graycoreio/github-actions-magento2/sansec-ecomscan@v8.1.0 # x-release-please-version
- uses: graycoreio/github-actions-magento2/sansec-ecomscan@v8.5.0 # x-release-please-version
with:
license: ${{ secrets.SANSEC_LICENSE_KEY }}
```
+1 -1
View File
@@ -31,7 +31,7 @@ jobs:
name: A job to semantically compare two versions
steps:
- uses: actions/checkout@v6
- uses: graycoreio/github-actions-magento2/semver-compare@v8.1.0 # x-release-please-version
- uses: graycoreio/github-actions-magento2/semver-compare@v8.5.0 # x-release-please-version
with:
version: 2.1.0
compare_against: 2.2.3
+4 -4
View File
@@ -28,7 +28,7 @@ jobs:
matrix: ${{ steps.supported-version.outputs.matrix }}
steps:
- uses: actions/checkout@v6
- uses: graycoreio/github-actions-magento2/supported-version@v8.1.0 # x-release-please-version
- uses: graycoreio/github-actions-magento2/supported-version@v8.5.0 # x-release-please-version
id: supported-version
compile:
@@ -40,19 +40,19 @@ jobs:
steps:
- uses: actions/checkout@v6
- uses: graycoreio/github-actions-magento2/setup-magento@v8.1.0 # x-release-please-version
- uses: graycoreio/github-actions-magento2/setup-magento@v8.5.0 # x-release-please-version
id: setup-magento
with:
php-version: ${{ matrix.php }}
tools: composer:v${{ matrix.composer }}
- uses: graycoreio/github-actions-magento2/cache-magento@v8.1.0 # x-release-please-version
- uses: graycoreio/github-actions-magento2/cache-magento@v8.5.0 # x-release-please-version
- run: composer install
env:
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
- uses: graycoreio/github-actions-magento2/setup-di-compile@v8.1.0 # x-release-please-version
- uses: graycoreio/github-actions-magento2/setup-di-compile@v8.5.0 # x-release-please-version
with:
path: ${{ steps.setup-magento.outputs.path }}
```
+3 -3
View File
@@ -36,7 +36,7 @@ jobs:
matrix: ${{ steps.supported-version.outputs.matrix }}
steps:
- uses: actions/checkout@v6
- uses: graycoreio/github-actions-magento2/supported-version@v8.1.0 # x-release-please-version
- uses: graycoreio/github-actions-magento2/supported-version@v8.5.0 # x-release-please-version
id: supported-version
with:
include_services: "true"
@@ -51,7 +51,7 @@ jobs:
steps:
- uses: actions/checkout@v6
- uses: graycoreio/github-actions-magento2/setup-magento@v8.1.0 # x-release-please-version
- uses: graycoreio/github-actions-magento2/setup-magento@v8.5.0 # x-release-please-version
id: setup-magento
with:
php-version: ${{ matrix.php }}
@@ -64,7 +64,7 @@ jobs:
env:
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
- uses: graycoreio/github-actions-magento2/setup-install@v8.1.0 # x-release-please-version
- uses: graycoreio/github-actions-magento2/setup-install@v8.5.0 # x-release-please-version
with:
services: ${{ toJSON(matrix.services) }}
path: ${{ steps.setup-magento.outputs.path }}
+1 -1
View File
File diff suppressed because one or more lines are too long
+5
View File
@@ -8,6 +8,7 @@ const BASE_ARGS = [
'--admin-firstname=Admin',
'--admin-lastname=User',
'--backend-frontname=admin',
'--no-interaction',
];
const MYSQL_SERVICE = {
@@ -60,6 +61,10 @@ describe('buildInstallArgs', () => {
it('returns only base args when services is empty', () => {
expect(buildInstallArgs({})).toEqual(BASE_ARGS);
});
it('runs non-interactively', () => {
expect(buildInstallArgs(null)).toContain('--no-interaction');
});
});
describe('mysql', () => {
+1
View File
@@ -24,6 +24,7 @@ const BASE_ARGS = [
'--admin-firstname=Admin',
'--admin-lastname=User',
'--backend-frontname=admin',
'--no-interaction',
];
const parsePort = (svc: ServiceConfig | undefined, index: 0 | 1, fallback: string): string => {
+2 -2
View File
@@ -51,7 +51,7 @@ jobs:
steps:
- uses: actions/checkout@v6
- uses: graycoreio/github-actions-magento2/setup-magento@v8.1.0 # x-release-please-version
- uses: graycoreio/github-actions-magento2/setup-magento@v8.5.0 # x-release-please-version
id: setup-magento
with:
php-version: "8.3"
@@ -89,7 +89,7 @@ jobs:
steps:
- uses: actions/checkout@v6
- uses: graycoreio/github-actions-magento2/setup-magento@v8.1.0 # x-release-please-version
- uses: graycoreio/github-actions-magento2/setup-magento@v8.5.0 # x-release-please-version
id: setup-magento
with:
php-version: "8.3"
+1 -1
View File
@@ -111,7 +111,7 @@ runs:
fi
printf '%s\n' "$line" >> .gitattributes
- uses: graycoreio/github-actions-magento2/fix-magento-install@v8.1.0
- uses: graycoreio/github-actions-magento2/fix-magento-install@main
name: Fix Magento Out of Box Install Issues
with:
magento_directory: ${{ steps.setup-magento-compute-directory.outputs.MAGENTO_DIRECTORY }}
+4 -3
View File
@@ -14,7 +14,7 @@ See the [action.yml](./action.yml)
| Input | Description | Required | Default |
|-----------------| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- |-----------------------|
| kind | The "kind" of support you're targeting for your package. See [Kinds](#kinds). | false | 'currently-supported' |
| project | The project to return the supported versions for. Allowed values are `mage-os` and `magento-open-source` | false | 'magento-open-source' |
| project | The project to return the supported versions for. Allowed values are `mage-os`, `mage-os-minimal`, and `magento-open-source` | false | 'magento-open-source' |
| custom_versions | The versions you want to support, as a comma-separated string, i.e. 'magento/project-community-edition:2.3.7-p3, magento/project-community-edition:2.4.2-p2' | false | '' |
| recent_time_frame | The time frame (from today) used when `kind` is `recent`. Combination of years (y), months (m), and days (d), e.g. `2y 2m 2d`. | false | '2y' |
| include_services | Whether to include a `services` key in each matrix entry with GitHub Actions service container configurations for MySQL, search engine, RabbitMQ, and cache. | false | 'true' |
@@ -31,6 +31,7 @@ See the [action.yml](./action.yml)
## Projects
- `mage-os`
- `mage-os-minimal`
- `magento-open-source` (default)
## Service preferences
@@ -67,7 +68,7 @@ with:
### Example
```yml
- uses: graycoreio/github-actions-magento2/supported-version@v8.1.0 # x-release-please-version
- uses: graycoreio/github-actions-magento2/supported-version@v8.5.0 # x-release-please-version
id: supported-version
with:
kind: currently-supported
@@ -93,7 +94,7 @@ jobs:
outputs:
matrix: ${{ steps.supported-version.outputs.matrix }}
steps:
- uses: graycoreio/github-actions-magento2/supported-version@v8.1.0 # x-release-please-version
- uses: graycoreio/github-actions-magento2/supported-version@v8.5.0 # x-release-please-version
id: supported-version
- run: echo ${{ steps.supported-version.outputs.matrix }}
```
+1 -1
View File
@@ -9,7 +9,7 @@ inputs:
default: "currently-supported"
project:
required: false
description: "The project to return the supported versions for. Allowed values are `mage-os` and `magento-open-source`"
description: "The project to return the supported versions for. Allowed values are `mage-os`, `mage-os-minimal`, and `magento-open-source`"
# The default value is what it is to keep backward compatibility
default: "magento-open-source"
custom_versions:
+23 -23
View File
File diff suppressed because one or more lines are too long
@@ -145,6 +145,12 @@ describe('getCurrentlySupportedVersions for mage-os', () => {
['2026-04-15T00:00:01Z', 'Release of 2.2.2', [
'mage-os/project-community-edition:2.2.2',
]],
['2026-05-13T00:00:01Z', 'Release of 2.3.0', [
'mage-os/project-community-edition:2.3.0',
]],
['2026-05-19T00:00:01Z', 'Release of 3.0.0', [
'mage-os/project-community-edition:3.0.0',
]],
])(
'supportedVersions for %s',
(date, description ,result) => {
@@ -1,4 +1,5 @@
{
"mage-os": ["mage-os/project-community-edition"],
"mage-os-minimal": ["mage-os/project-minimal-edition"],
"magento-open-source": ["magento/project-community-edition"]
}
@@ -1,4 +1,5 @@
{
"mage-os": ["mage-os/project-community-edition:next"],
"mage-os-minimal": ["mage-os/project-minimal-edition:next"],
"magento-open-source": ["magento/project-community-edition:next"]
}
@@ -3,6 +3,7 @@
*/
export const KNOWN_PROJECTS = {
"mage-os": true,
"mage-os-minimal": true,
"magento-open-source": true,
}
@@ -4,6 +4,7 @@ describe('validateProject', () => {
it('returns `true` if its a valid project', () => {
expect(validateProject("magento-open-source")).toBe(true);
expect(validateProject("mage-os")).toBe(true);
expect(validateProject("mage-os-minimal")).toBe(true);
});
it('throws a helpful exception if it is an invalid project', () => {
@@ -4,6 +4,7 @@ import {Project} from "../projects";
describe('isKnownProject', () => {
it('returns `true` for known projects', () => {
expect(isKnownProject("mage-os")).toBe(true)
expect(isKnownProject("mage-os-minimal")).toBe(true)
expect(isKnownProject("magento-open-source")).toBe(true)
});
@@ -1,5 +1,7 @@
import { buildServicesForEntry } from './build-services';
import { PackageMatrixVersion } from '../matrix/matrix-type';
import mageOsMinimalIndividual from '../versions/mage-os-minimal/individual.json';
import mageOsMinimalComposite from '../versions/mage-os-minimal/composite.json';
const createTestEntry = (overrides: Partial<PackageMatrixVersion> = {}): PackageMatrixVersion => ({
magento: 'magento/project-community-edition:2.4.7',
@@ -362,4 +364,17 @@ describe('buildServicesForEntry', () => {
expect(withPref).toEqual(withoutPref);
});
});
describe('mage-os-minimal', () => {
const minimalEntries: [string, PackageMatrixVersion][] = [
...Object.entries(mageOsMinimalIndividual as unknown as Record<string, PackageMatrixVersion>),
...Object.entries(mageOsMinimalComposite as unknown as Record<string, PackageMatrixVersion>)
];
it.each(minimalEntries)('omits rabbitmq from services for %s', (_key, entry) => {
const services = buildServicesForEntry(entry);
expect(services.rabbitmq).toBeUndefined();
});
});
});
@@ -5,6 +5,7 @@ describe('getIndividialVersionsForProject', () => {
it('returns individual versions matrix for magento-open-source', () => {
expect(Object.keys(getIndividualVersionsForProject("magento-open-source")).length).toBeGreaterThan(0)
expect(Object.keys(getIndividualVersionsForProject("mage-os")).length).toBeGreaterThan(0)
expect(Object.keys(getIndividualVersionsForProject("mage-os-minimal")).length).toBeGreaterThan(0)
})
it('throws error if no individual versions are specified for given project', () => {
@@ -16,6 +17,7 @@ describe('getCompositeVersionsForProject', () => {
it('returns composite versions matrix for magento-open-source', () => {
expect(Object.keys(getCompositeVersionsForProject("magento-open-source")).length).toBeGreaterThan(0)
expect(Object.keys(getCompositeVersionsForProject("mage-os")).length).toBeGreaterThan(0)
expect(Object.keys(getCompositeVersionsForProject("mage-os-minimal")).length).toBeGreaterThan(0)
})
it('throws error if no composite versions are specified for given project', () => {
@@ -3,11 +3,13 @@ import { PackageMatrixVersion } from "../matrix/matrix-type";
const individual = {
'mage-os': require('./mage-os/individual.json'),
'mage-os-minimal': require('./mage-os-minimal/individual.json'),
'magento-open-source': require('./magento-open-source/individual.json')
}
const composite = {
'mage-os': require('./mage-os/composite.json'),
'mage-os-minimal': require('./mage-os-minimal/composite.json'),
'magento-open-source': require('./magento-open-source/composite.json')
}
@@ -0,0 +1,41 @@
{
"mage-os/project-minimal-edition": {
"magento": "mage-os/project-minimal-edition",
"php": 8.5,
"composer": "2.9.8",
"mysql": "mysql:8.4",
"opensearch": "opensearchproject/opensearch:3",
"valkey": "valkey/valkey:9",
"varnish": "varnish:8",
"nginx": "nginx:1.28",
"os": "ubuntu-latest",
"release": "2026-05-19T00:00:00+0000",
"eol": "2029-05-19T00:00:00+0000"
},
"mage-os/project-minimal-edition:next": {
"magento": "mage-os/project-minimal-edition:next",
"php": 8.5,
"composer": "2.9.8",
"mysql": "mysql:8.4",
"opensearch": "opensearchproject/opensearch:3",
"valkey": "valkey/valkey:9",
"varnish": "varnish:8",
"nginx": "nginx:1.28",
"os": "ubuntu-latest",
"release": "2026-05-19T00:00:00+0000",
"eol": "2029-05-19T00:00:00+0000"
},
"mage-os/project-minimal-edition:>=3.0 <3.1": {
"magento": "mage-os/project-minimal-edition:>=3.0 <3.1",
"php": 8.5,
"composer": "2.9.8",
"mysql": "mysql:8.4",
"opensearch": "opensearchproject/opensearch:3",
"valkey": "valkey/valkey:9",
"varnish": "varnish:8",
"nginx": "nginx:1.28",
"os": "ubuntu-latest",
"release": "2026-05-19T00:00:00+0000",
"eol": "2029-05-19T00:00:00+0000"
}
}
@@ -0,0 +1,16 @@
{
"mage-os/project-minimal-edition:3.0.0": {
"magento": "mage-os/project-minimal-edition:3.0.0",
"upstream": "2.4.9",
"php": 8.5,
"composer": "2.9.8",
"mysql": "mysql:8.4",
"opensearch": "opensearchproject/opensearch:3",
"valkey": "valkey/valkey:9",
"varnish": "varnish:8",
"nginx": "nginx:1.28",
"os": "ubuntu-latest",
"release": "2026-05-19T00:00:00+0000",
"eol": "2029-05-19T00:00:00+0000"
}
}
@@ -6,13 +6,12 @@
"mysql": "mysql:8.4",
"opensearch": "opensearchproject/opensearch:3",
"rabbitmq": "rabbitmq:4.1-management",
"valkey": "valkey/valkey:8.0",
"redis": "redis:7.2",
"valkey": "valkey/valkey:8",
"varnish": "varnish:7.7",
"nginx": "nginx:1.28",
"os": "ubuntu-latest",
"release": "2026-04-15T00:00:00+0000",
"eol": "2029-04-15T00:00:00+0000"
"release": "2026-05-19T00:00:00+0000",
"eol": "2029-05-19T00:00:00+0000"
},
"mage-os/project-community-edition:next": {
"magento": "mage-os/project-community-edition:next",
@@ -21,13 +20,12 @@
"mysql": "mysql:8.4",
"opensearch": "opensearchproject/opensearch:3",
"rabbitmq": "rabbitmq:4.1-management",
"valkey": "valkey/valkey:8.0",
"redis": "redis:7.2",
"valkey": "valkey/valkey:8",
"varnish": "varnish:7.7",
"nginx": "nginx:1.28",
"os": "ubuntu-latest",
"release": "2026-04-15T00:00:00+0000",
"eol": "2029-04-15T00:00:00+0000"
"release": "2026-05-19T00:00:00+0000",
"eol": "2029-05-19T00:00:00+0000"
},
"mage-os/project-community-edition:>=1.0 <1.1": {
"magento": "mage-os/project-community-edition:>=1.0 <1.1",
@@ -126,6 +124,34 @@
"nginx": "nginx:1.28",
"os": "ubuntu-latest",
"release": "2026-03-10T00:00:00+0000",
"eol": "2029-04-15T00:00:00+0000"
"eol": "2026-05-13T00:00:00+0000"
},
"mage-os/project-community-edition:>=2.3 <2.4": {
"magento": "mage-os/project-community-edition:>=2.3 <2.4",
"php": 8.4,
"composer": "2.9.8",
"mysql": "mysql:8.4",
"opensearch": "opensearchproject/opensearch:2.19.1",
"rabbitmq": "rabbitmq:4.0-management",
"redis": "redis:7.2",
"varnish": "varnish:7.6",
"nginx": "nginx:1.26",
"os": "ubuntu-latest",
"release": "2026-05-13T00:00:00+0000",
"eol": "2026-05-19T00:00:00+0000"
},
"mage-os/project-community-edition:>=3.0 <3.1": {
"magento": "mage-os/project-community-edition:>=3.0 <3.1",
"php": 8.5,
"composer": "2.9.8",
"mysql": "mysql:8.4",
"opensearch": "opensearchproject/opensearch:3",
"rabbitmq": "rabbitmq:4.2-management",
"valkey": "valkey/valkey:9",
"varnish": "varnish:8",
"nginx": "nginx:1.28",
"os": "ubuntu-latest",
"release": "2026-05-19T00:00:00+0000",
"eol": "2029-05-19T00:00:00+0000"
}
}
@@ -253,6 +253,36 @@
"nginx": "nginx:1.28",
"os": "ubuntu-latest",
"release": "2026-04-15T00:00:00+0000",
"eol": "2029-04-15T00:00:00+0000"
"eol": "2026-05-13T00:00:00+0000"
},
"mage-os/project-community-edition:2.3.0": {
"magento": "mage-os/project-community-edition:2.3.0",
"upstream": "2.4.8-p5",
"php": 8.4,
"composer": "2.9.8",
"mysql": "mysql:8.4",
"opensearch": "opensearchproject/opensearch:2.19.1",
"rabbitmq": "rabbitmq:4.0-management",
"redis": "redis:7.2",
"varnish": "varnish:7.6",
"nginx": "nginx:1.26",
"os": "ubuntu-latest",
"release": "2026-05-13T00:00:00+0000",
"eol": "2026-05-19T00:00:00+0000"
},
"mage-os/project-community-edition:3.0.0": {
"magento": "mage-os/project-community-edition:3.0.0",
"upstream": "2.4.9",
"php": 8.5,
"composer": "2.9.8",
"mysql": "mysql:8.4",
"opensearch": "opensearchproject/opensearch:3",
"rabbitmq": "rabbitmq:4.2-management",
"valkey": "valkey/valkey:9",
"varnish": "varnish:8",
"nginx": "nginx:1.28",
"os": "ubuntu-latest",
"release": "2026-05-19T00:00:00+0000",
"eol": "2029-05-19T00:00:00+0000"
}
}