mirror of
https://github.com/graycoreio/github-actions-magento2.git
synced 2026-06-13 05:04:54 +00:00
Compare commits
256 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2ef157ef8a | |||
| 7e40a62efa | |||
| b4526dbb52 | |||
| e6be791eed | |||
| 2855f468ef | |||
| 7e70ee93ef | |||
| d29e574475 | |||
| c19912dc4b | |||
| c26e84f693 | |||
| 48902e8e6a | |||
| 07f89530df | |||
| 505179ce7b | |||
| 34ddee6aef | |||
| 462e60345e | |||
| f45372b796 | |||
| 7b5ccf7d9d | |||
| dc2f775d75 | |||
| 5f3ba73bc6 | |||
| 86b01b17fa | |||
| c2c3755729 | |||
| 5d47cda771 | |||
| dc750a9f2f | |||
| 7c0bc65842 | |||
| 89912779a9 | |||
| 484dc14f62 | |||
| 810a5705cf | |||
| 389830f189 | |||
| 45e881414f | |||
| c05755261d | |||
| 5608271fe3 | |||
| 5fd96b988e | |||
| b0a3bea8e4 | |||
| e99b140104 | |||
| a8e8db3572 | |||
| 2b6d19f691 | |||
| 499eb24a13 | |||
| e12d993761 | |||
| 229f7a2684 | |||
| 5fb9523081 | |||
| 178ec212f2 | |||
| 87b8b80feb | |||
| 9c1dbc7d07 | |||
| ab5dc9fc95 | |||
| 2dbed0d4a7 | |||
| f5460068b6 | |||
| 886bbbb9ba | |||
| da59af27fa | |||
| 0c244f2f28 | |||
| 1ab0330f1f | |||
| 8a95e723df | |||
| d5e7876887 | |||
| 611c336883 | |||
| ebd21042cd | |||
| dfb8be2ee7 | |||
| 6179ca545b | |||
| 962e52d426 | |||
| 6c31728af2 | |||
| 3ef43188b2 | |||
| 91fe5d8ddf | |||
| 3fc699af5c | |||
| 9992afe6f0 | |||
| f48c544053 | |||
| 21c3bb3436 | |||
| 0f072ba9a0 | |||
| 01cbea18c9 | |||
| 2f1b2eaa5d | |||
| 157b6877e2 | |||
| 0008e8642d | |||
| fb29b3d3ac | |||
| 8d21604ac9 | |||
| 9c06178b30 | |||
| 4c536e3d96 | |||
| 404e77a0a1 | |||
| 294ba33d22 | |||
| 3fcf4e8830 | |||
| c1c2361412 | |||
| 199f035823 | |||
| cf9dc345a0 | |||
| 81769a5801 | |||
| 20e57cc8cc | |||
| 585fe1960d | |||
| 14157e0107 | |||
| fb68b8413a | |||
| 22aca78cc8 | |||
| ca7cd551a3 | |||
| d763a4f246 | |||
| b71a68f6c5 | |||
| 06643ca72b | |||
| d692d0f268 | |||
| b18dcc9636 | |||
| fd7bc5c2ad | |||
| 670cfada18 | |||
| 58291d6124 | |||
| bcb4d4e8ca | |||
| bd16a2ede2 | |||
| 24899973c7 | |||
| cc16fbeece | |||
| 6ba77aab04 | |||
| 43d0e08cbd | |||
| 4372c49355 | |||
| 520038cb94 | |||
| b3f81d4a69 | |||
| 36d912de34 | |||
| 6da9161782 | |||
| 1f11e88b9d | |||
| b15dc26632 | |||
| f1cfb5ac10 | |||
| 30a7867ee4 | |||
| f9554e5337 | |||
| 7918693687 | |||
| 999d81761d | |||
| 0db5983be9 | |||
| 915392f200 | |||
| ede917ef8c | |||
| 0fea5402ee | |||
| 3ba1a28f5e | |||
| d11e680d8f | |||
| 313c2430c0 | |||
| 113ab6edb4 | |||
| 9af34de2df | |||
| b633b2120a | |||
| 6f6b6fd6fd | |||
| 6e50d0d8de | |||
| e29ea44597 | |||
| a3262710f1 | |||
| b4f27f19e5 | |||
| dd47d22478 | |||
| f1b13e8984 | |||
| 4f193802bc | |||
| 52584b3dd2 | |||
| c41d657f25 | |||
| 54f7204e3f | |||
| 120b61c253 | |||
| a6eb2a4f73 | |||
| 31100c7875 | |||
| 0569f6cd82 | |||
| c182206975 | |||
| 6728d6bc78 | |||
| be076091a2 | |||
| 6632e42332 | |||
| 5bf3436207 | |||
| a85b811eab | |||
| 28524a8dc7 | |||
| 7af06fcecf | |||
| 0575002ef9 | |||
| 4a0794c67a | |||
| 87fe77f8a8 | |||
| 168696ef43 | |||
| ed82ffa437 | |||
| 1fd928e0bb | |||
| 6a08e4f15b | |||
| 258cda966c | |||
| e7cdca1774 | |||
| 93ff913554 | |||
| c78cab7241 | |||
| b65059225c | |||
| 2086708ffc | |||
| eb79849a07 | |||
| 822a6e2cb4 | |||
| 483ee7ce1f | |||
| e3a0b778b7 | |||
| 748532bb10 | |||
| 8027ccfb40 | |||
| e58a777bdd | |||
| 45a92e5b81 | |||
| a91d08567a | |||
| 800e2a1288 | |||
| 952c43771c | |||
| 62a4308154 | |||
| fd91ed3677 | |||
| 6bcaa9bdea | |||
| d120d4f6d0 | |||
| 68cbb2e752 | |||
| 5464f44f3a | |||
| 335930740f | |||
| bf34ec4964 | |||
| 427a631508 | |||
| b645c2327d | |||
| b7a037a472 | |||
| 7f1821f6ac | |||
| 88901eacf7 | |||
| 00939b1609 | |||
| 4e21b18ee9 | |||
| 01e4ccbc54 | |||
| bc840e1372 | |||
| f79de7d7d2 | |||
| 76fcd70226 | |||
| dcd92b12a2 | |||
| 4aa63b292d | |||
| e12e899610 | |||
| 163b86c96c | |||
| 2fc7278b9f | |||
| f7f0504691 | |||
| 28643a7156 | |||
| 8c373fef86 | |||
| f50c12a470 | |||
| 54ab891af4 | |||
| ff609fef4e | |||
| 20fecd7681 | |||
| c9d35aa187 | |||
| bf75309cfb | |||
| 12238a2e92 | |||
| 5599a0d2e7 | |||
| c093834133 | |||
| f8835e5c0a | |||
| bb848c4b0a | |||
| 19d95ee260 | |||
| fcaf3e4ed2 | |||
| dd14f7859c | |||
| 847b7464a1 | |||
| 5156dab92f | |||
| 23492464b2 | |||
| fdd5cb7dad | |||
| d3746393a0 | |||
| b82ff0d536 | |||
| 2726817e55 | |||
| 85d11af76e | |||
| 28248496e0 | |||
| e48a3463c5 | |||
| b89832acd5 | |||
| d1aff86514 | |||
| 6650651684 | |||
| 1dc33c08a1 | |||
| 7b813336fa | |||
| aef1d9a5c1 | |||
| 08024b61c5 | |||
| 8108cd87fc | |||
| 26f77d7dbe | |||
| 653be3b276 | |||
| 320fc062aa | |||
| d550ebc9f6 | |||
| 11efc54d5e | |||
| c9b7f41525 | |||
| 5c198049f7 | |||
| 81a1eb2273 | |||
| 5bbda33138 | |||
| 0b005d1d95 | |||
| 6776e7f306 | |||
| c136c111d9 | |||
| d3b1ab6b34 | |||
| 1d9ad11e92 | |||
| 0f31e401b7 | |||
| e3f4c10c7b | |||
| dbc889f7ce | |||
| c0390c8abd | |||
| d43068a144 | |||
| 805b23b1fa | |||
| b0e1a0a943 | |||
| 725ba09bf5 | |||
| 9d6355d5e6 | |||
| 7b74ff7386 | |||
| f5d43a5184 | |||
| 856d2df481 | |||
| d8936216c0 | |||
| 84c16c2ad9 | |||
| fd858c3063 |
@@ -0,0 +1,6 @@
|
||||
module.exports = {
|
||||
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
|
||||
parser: '@typescript-eslint/parser',
|
||||
plugins: ['@typescript-eslint'],
|
||||
root: true,
|
||||
};
|
||||
+9
-26
@@ -1,10 +1,10 @@
|
||||
# $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
|
||||
# $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
|
||||
# $$ Magento 2 GitHub Actions Code Owners $$
|
||||
# $$ Code Owners $$
|
||||
# $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
|
||||
# $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
|
||||
#
|
||||
# The configuration for Code Owners for graycoreio/magento2-github-actions.
|
||||
# The configuration for Code Owners for graycoreio/magento2-devcontainer.
|
||||
#
|
||||
# For more info see: https://help.github.com/articles/about-codeowners/
|
||||
#
|
||||
@@ -14,11 +14,12 @@
|
||||
# Concepts
|
||||
# ================================================
|
||||
#
|
||||
# 1. A CodeOwner should only review what they are comfortable reviewing. If you're not comfortable, say something.
|
||||
# 2. It is a CodeOwners responsibility to only accept the changes that they understand and deem necessary.
|
||||
# 3. The CodeOwners have final say on whether or not code is accepted.
|
||||
# 4. If multiple CodeOwners are listed, ALL code owners must approve the PR prior to merge.
|
||||
# 5. CodeOwners work in conjunction with Github's "Number of Required Approvals (1)" requirement.
|
||||
# A CodeOwner should only review what they are comfortable reviewing. If you're not comfortable, say something.
|
||||
# It is a CodeOwners responsibility to only accept the changes that they understand and deem necessary.
|
||||
# The CodeOwners have final say on whether or not code is accepted.
|
||||
# If multiple CodeOwners are listed, ALL code owners must approve the PR prior to merge.
|
||||
# CodeOwners work in conjunction with Github's "Number of Required Approvals (1)" requirement.
|
||||
|
||||
|
||||
|
||||
# ================================================
|
||||
@@ -28,18 +29,6 @@
|
||||
# damienwebdev - Damien Retzinger
|
||||
|
||||
|
||||
|
||||
######################################################################################################
|
||||
#
|
||||
# Team structure and memberships
|
||||
# ------------------------------
|
||||
#
|
||||
#
|
||||
# Any changes to team structure or memberships must first be made in this file and only then
|
||||
# implemented in the GitHub UI.
|
||||
#######################################################################################################
|
||||
|
||||
|
||||
######################################################################################################
|
||||
#
|
||||
# CODEOWNERS rules
|
||||
@@ -57,10 +46,4 @@
|
||||
# Default Owners
|
||||
# ================================================
|
||||
|
||||
* @damienwebdev
|
||||
|
||||
# ================================================
|
||||
# CODEOWNERS Owners owners ...
|
||||
# ================================================
|
||||
|
||||
/.github/CODEOWNERS @damienwebdev
|
||||
* @damienwebdev
|
||||
@@ -1,3 +0,0 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: graycoreio
|
||||
@@ -31,11 +31,29 @@ on:
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
compute_matrix:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
matrix: ${{ steps.supported-version.outputs.matrix }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: ./supported-version
|
||||
with:
|
||||
kind: currently-supported
|
||||
id: supported-version
|
||||
- run: echo ${{ steps.supported-version.outputs.matrix }}
|
||||
|
||||
coding-standard:
|
||||
needs: compute_matrix
|
||||
strategy:
|
||||
matrix: ${{ fromJSON(needs.compute_matrix.outputs.matrix) }}
|
||||
fail-fast: false
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v6
|
||||
- uses: './coding-standard'
|
||||
with:
|
||||
version: ${{ github.event.inputs.version || '*' }}
|
||||
path: ${{ github.event.inputs.path || '_test/demo-package' }}
|
||||
path: ${{ github.event.inputs.path || '_test/demo-package' }}
|
||||
composer_version: ${{ matrix.composer }}
|
||||
php_version: ${{ matrix.php }}
|
||||
@@ -0,0 +1,39 @@
|
||||
name: Get Composer Version
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- testing
|
||||
paths:
|
||||
- ".github/workflows/_internal-get-composer-version.yaml"
|
||||
- "get-composer-version/**"
|
||||
- "!(**/*.md)"
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- ".github/workflows/_internal-get-composer-version.yaml"
|
||||
- "get-composer-version/**"
|
||||
- "!(**/*.md)"
|
||||
|
||||
jobs:
|
||||
get-composer-version:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- name: Set PHP Version
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: 8.1
|
||||
tools: composer:v2.4.2
|
||||
|
||||
- uses: ./get-composer-version
|
||||
id: composer-version
|
||||
|
||||
|
||||
- name: Fail if versions do not match
|
||||
if: steps.composer-version.outputs.version != '2.4.2'
|
||||
shell: bash
|
||||
run: echo "${{ steps.composer-version.outputs.version }}" && exit 1
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
name: Get Magento Version
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- ".github/workflows/_internal-get-magento-version.yaml"
|
||||
- "get-magento-version/**"
|
||||
- "!(**/*.md)"
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- ".github/workflows/_internal-get-magento-version.yaml"
|
||||
- "get-magento-version/**"
|
||||
- "!(**/*.md)"
|
||||
|
||||
jobs:
|
||||
get-magento-version:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- name: Set PHP Version
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: 8.1
|
||||
tools: composer:v2.4.2
|
||||
|
||||
- run: composer create-project --repository-url="https://mirror.mage-os.org" "magento/project-community-edition:2.4.5-p1" ../magento2 --no-install
|
||||
shell: bash
|
||||
name: Create Magento ${{ matrix.magento }} Project
|
||||
|
||||
- uses: ./get-magento-version
|
||||
id: magento-version
|
||||
with:
|
||||
working-directory: ../magento2
|
||||
|
||||
- name: Fail if key does not match
|
||||
if: steps.magento-version.outputs.version != '"2.4.5-p1"'
|
||||
shell: bash
|
||||
run: echo "${{ steps.magento-version.outputs.version }}" && exit 1
|
||||
|
||||
@@ -21,16 +21,19 @@ on:
|
||||
- "supported-version/**"
|
||||
- "!(**/*.md)"
|
||||
|
||||
env:
|
||||
MAGENTO_COMPOSER_REPO: "https://mirror.mage-os.org/"
|
||||
|
||||
jobs:
|
||||
compute_matrix:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
matrix: ${{ steps.supported-version.outputs.matrix }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v6
|
||||
- uses: ./supported-version
|
||||
with:
|
||||
kind: all
|
||||
kind: currently-supported
|
||||
id: supported-version
|
||||
- run: echo ${{ steps.supported-version.outputs.matrix }}
|
||||
|
||||
@@ -41,11 +44,13 @@ jobs:
|
||||
fail-fast: false
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v6
|
||||
- uses: ./installation-test
|
||||
with:
|
||||
composer_version: ${{ matrix.composer }}
|
||||
php_version: ${{ matrix.php }}
|
||||
magento_version: ${{ matrix.magento }}
|
||||
package_name: graycore/magento2-demo-package
|
||||
source_folder: $GITHUB_WORKSPACE/_test/demo-package
|
||||
package_name: mage-os/magento2-demo-package
|
||||
source_folder: $GITHUB_WORKSPACE/_test/demo-package
|
||||
composer_auth: ${{ secrets.COMPOSER_AUTH }}
|
||||
magento_repository: ${{ env.MAGENTO_COMPOSER_REPO }}
|
||||
@@ -27,18 +27,20 @@ jobs:
|
||||
outputs:
|
||||
matrix: ${{ steps.supported-version.outputs.matrix }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v6
|
||||
- uses: ./supported-version
|
||||
with:
|
||||
kind: all
|
||||
kind: currently-supported
|
||||
include_services: true
|
||||
id: supported-version
|
||||
- run: echo ${{ steps.supported-version.outputs.matrix }}
|
||||
integration-workflow:
|
||||
needs: compute_matrix
|
||||
uses: ./.github/workflows/integration.yaml
|
||||
with:
|
||||
package_name: graycore/magento2-demo-package
|
||||
package_name: mage-os/magento2-demo-package
|
||||
source_folder: $GITHUB_WORKSPACE/_test/demo-package
|
||||
matrix: ${{ needs.compute_matrix.outputs.matrix }}
|
||||
test_command: ../../../vendor/bin/phpunit ../../../vendor/graycore/magento2-demo-package/Test/Integration
|
||||
test_command: ../../../vendor/bin/phpunit ../../../vendor/mage-os/magento2-demo-package/Test/Integration
|
||||
fail-fast: false
|
||||
secrets:
|
||||
composer_auth: ${{ secrets.COMPOSER_AUTH }}
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
name: Test semvar-compare action
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- ".github/workflows/_internal-semver-compare.yaml"
|
||||
- "semver-compare/**"
|
||||
- "!(**/*.md)"
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- ".github/workflows/_internal-semver-compare.yaml"
|
||||
- "semver-compare/**"
|
||||
- "!(**/*.md)"
|
||||
|
||||
jobs:
|
||||
semver-compare:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- uses: ./semver-compare
|
||||
id: version-compare-1
|
||||
with:
|
||||
version: 2.2.3
|
||||
compare_against: 2.3
|
||||
|
||||
- uses: ./semver-compare
|
||||
id: version-compare-2
|
||||
with:
|
||||
version: 2
|
||||
compare_against: 2.0.1
|
||||
|
||||
- uses: ./semver-compare
|
||||
id: version-compare-3
|
||||
with:
|
||||
version: 2.2.1
|
||||
compare_against: 2.2
|
||||
|
||||
|
||||
- uses: ./semver-compare
|
||||
id: version-compare-4
|
||||
with:
|
||||
version: 2.2.0
|
||||
compare_against: 2.2.0
|
||||
|
||||
- name: Fail if 2.3 is not higher than 2.2.3
|
||||
if: steps.version-compare-1.outputs.result != -1
|
||||
shell: bash
|
||||
run: echo "FAIL because 2.3 must be higher than 2.2.3 Compare 2.2.3 to 2.3 renders ${{ steps.version-compare-1.outputs.result }}" && exit 1
|
||||
|
||||
|
||||
- name: Fail if 2.0.1 is not higher than 2
|
||||
if: steps.version-compare-2.outputs.result != -1
|
||||
shell: bash
|
||||
run: echo "FAIL because 2.0.1 must be higher than 2 Compare 2 to 2.0.1 renders ${{ steps.version-compare-2.outputs.result }}" && exit 1
|
||||
|
||||
- name: Fail if 2.2.1 is not higher than 2.2
|
||||
if: steps.version-compare-3.outputs.result != 1
|
||||
shell: bash
|
||||
run: echo "FAIL because 2.2.1 must be higher than 2.2 Compare 2.2.1 to 2.2 renders ${{ steps.version-compare-3.outputs.result }}" && exit 1
|
||||
|
||||
- name: Fail if 2.2.0 is not equals to 2.2.0
|
||||
if: steps.version-compare-4.outputs.result != 0
|
||||
shell: bash
|
||||
run: echo "FAIL because 2.2.0 must be equal to 2.2.0 Compare 2.2.0 to 2.2.0 renders ${{ steps.version-compare-4.outputs.result }}" && exit 1
|
||||
@@ -0,0 +1,141 @@
|
||||
name: Setup Magento Test
|
||||
|
||||
on:
|
||||
workflow_dispatch: {}
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "setup-magento/**"
|
||||
- ".github/workflows/_internal-setup-magento.yaml"
|
||||
- "supported-version/**"
|
||||
- "!(**/*.md)"
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "setup-magento/**"
|
||||
- ".github/workflows/_internal-setup-magento.yaml"
|
||||
- "supported-version/**"
|
||||
- "!(**/*.md)"
|
||||
|
||||
env:
|
||||
PSEUDO_REPO_FOLDER: ../magento_repo
|
||||
magento_folder: ../magento2
|
||||
MAGENTO_COMPOSER_REPO: "https://mirror.mage-os.org/"
|
||||
|
||||
jobs:
|
||||
compute_matrix:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
matrix: ${{ steps.supported-version.outputs.matrix }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: ./supported-version
|
||||
with:
|
||||
kind: currently-supported
|
||||
id: supported-version
|
||||
- run: echo ${{ steps.supported-version.outputs.matrix }}
|
||||
|
||||
setup-magento-store:
|
||||
needs: compute_matrix
|
||||
strategy:
|
||||
matrix: ${{ fromJSON(needs.compute_matrix.outputs.matrix) }}
|
||||
fail-fast: false
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- run: |
|
||||
PSEUDO_STORE_FULL_PATH=$(realpath "${{ env.PSEUDO_REPO_FOLDER }}")
|
||||
echo "PSEUDO_STORE_FULL_PATH=$PSEUDO_STORE_FULL_PATH" >> $GITHUB_ENV
|
||||
name: Generate Full Pseudo Store Path
|
||||
shell: bash
|
||||
|
||||
- name: Set PHP Version
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
tools: composer:v${{ matrix.composer }}
|
||||
|
||||
- uses: actions/cache@v5
|
||||
id: setup-magento-store-cache
|
||||
with:
|
||||
key: setup-magento-ci | ${{ runner.os }} | ${{ matrix.magento }}
|
||||
path: ${{ env.PSEUDO_STORE_FULL_PATH }}
|
||||
|
||||
- run: composer create-project --repository-url="${{ env.MAGENTO_COMPOSER_REPO }}" "${{ matrix.magento }}" "${{ env.PSEUDO_REPO_FOLDER }}" --no-install
|
||||
name: Create Store to simulate a real Magento store in a real repo.
|
||||
if: steps.setup-magento-store-cache.outputs.cache-hit != 'true'
|
||||
env:
|
||||
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
|
||||
|
||||
- uses: ./fix-magento-install
|
||||
name: Fix Magento Out of Box Install Issues
|
||||
with:
|
||||
magento_directory: ${{ env.PSEUDO_REPO_FOLDER }}
|
||||
if: steps.setup-magento-store-cache.outputs.cache-hit != 'true'
|
||||
env:
|
||||
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
|
||||
|
||||
- run: composer install
|
||||
shell: bash
|
||||
working-directory: "${{ env.PSEUDO_REPO_FOLDER }}"
|
||||
if: steps.setup-magento-store-cache.outputs.cache-hit != 'true'
|
||||
env:
|
||||
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
|
||||
|
||||
- run: git init && git config user.email "you@example.com" && git config user.name "Your Name" && git add . && git commit -m "init" && git clean -fdx
|
||||
working-directory: "${{ env.PSEUDO_REPO_FOLDER }}"
|
||||
if: steps.setup-magento-store-cache.outputs.cache-hit != 'true'
|
||||
|
||||
- run: cp -R ${{ env.PSEUDO_REPO_FOLDER }} ${{ env.magento_folder }}
|
||||
shell: bash
|
||||
|
||||
- uses: ./setup-magento
|
||||
id: setup-magento
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
tools: composer:v${{ matrix.composer }}
|
||||
mode: store
|
||||
working-directory: ${{ env.magento_folder }}
|
||||
composer_auth: ${{ secrets.COMPOSER_AUTH }}
|
||||
|
||||
- uses: graycoreio/github-actions-magento2/cache-magento@main
|
||||
with:
|
||||
mode: 'store'
|
||||
composer_cache_key: '${{ matrix.magento }}'
|
||||
|
||||
- run: composer install
|
||||
name: Composer install
|
||||
shell: bash
|
||||
working-directory: ${{ steps.setup-magento.outputs.path }}
|
||||
env:
|
||||
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
|
||||
|
||||
setup-magento-extension:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- uses: ./setup-magento
|
||||
id: setup-magento
|
||||
with:
|
||||
php-version: 8.4
|
||||
tools: composer:v2.8
|
||||
mode: extension
|
||||
magento_repository: ${{ env.MAGENTO_COMPOSER_REPO }}
|
||||
composer_auth: ${{ secrets.COMPOSER_AUTH }}
|
||||
magento_version: magento/project-community-edition:2.4.8-p3
|
||||
|
||||
- uses: graycoreio/github-actions-magento2/cache-magento@main
|
||||
with:
|
||||
mode: 'extension'
|
||||
composer_cache_key: 'magento/project-community-edition:2.4.8-p3'
|
||||
|
||||
- run: composer install
|
||||
name: Composer install
|
||||
shell: bash
|
||||
working-directory: ${{ steps.setup-magento.outputs.path }}
|
||||
env:
|
||||
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
|
||||
@@ -23,11 +23,12 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
php_version:
|
||||
- 7.4
|
||||
- 8.1
|
||||
- 8.2
|
||||
- 8.3
|
||||
- 8.4
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v6
|
||||
- uses: ./unit-test
|
||||
with:
|
||||
source_folder: _test/demo-package
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
name: Check Extension Test
|
||||
|
||||
on:
|
||||
workflow_dispatch: {}
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "_test/demo-package/**"
|
||||
- ".github/workflows/_internal_check_extension.yaml"
|
||||
- ".github/workflows/check-extension.yaml"
|
||||
- "supported-version/**"
|
||||
- "!(**/*.md)"
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "_test/demo-package/**"
|
||||
- ".github/workflows/_internal_check_extension.yaml"
|
||||
- ".github/workflows/check-extension.yaml"
|
||||
- "supported-version/**"
|
||||
- "!(**/*.md)"
|
||||
jobs:
|
||||
compute_matrix:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
matrix: ${{ steps.supported-version.outputs.matrix }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: ./supported-version
|
||||
with:
|
||||
kind: currently-supported
|
||||
include_services: true
|
||||
id: supported-version
|
||||
check-workflow:
|
||||
needs: compute_matrix
|
||||
uses: ./.github/workflows/check-extension.yaml
|
||||
with:
|
||||
path: _test/demo-package
|
||||
matrix: ${{ needs.compute_matrix.outputs.matrix }}
|
||||
@@ -7,7 +7,7 @@ on:
|
||||
paths:
|
||||
- ".github/workflows/_internal-supported-version.yaml"
|
||||
- "supported-version/**"
|
||||
- "package.json"
|
||||
- "package-lock.json"
|
||||
- "!(**/*.md)"
|
||||
pull_request:
|
||||
branches:
|
||||
@@ -15,14 +15,14 @@ on:
|
||||
paths:
|
||||
- ".github/workflows/_internal-supported-version.yaml"
|
||||
- "supported-version/**"
|
||||
- "package.json"
|
||||
- "package-lock.json"
|
||||
- "!(**/*.md)"
|
||||
|
||||
jobs:
|
||||
unit-test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- run: npm ci
|
||||
shell: bash
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
# MageCheck Extension
|
||||
|
||||
A Github Workflow that runs various kinds of quality checks for a Magento Extension.
|
||||
|
||||
## Inputs
|
||||
|
||||
See the [check-extension.yaml](./check-extension.yaml)
|
||||
|
||||
| Input | Description | Required | Default |
|
||||
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- | -------- | --------------------------- |
|
||||
| matrix | JSON string of [version matrix for Magento](./#matrix-format) | true | NULL |
|
||||
| fail-fast | Same as Github's [fail-fast](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategyfail-fast) | false | true |
|
||||
| path | The folder of the Magento store or extension that you are testing | false | . |
|
||||
| magento_repository | Where to install Magento from | false | https://mirror.mage-os.org/ |
|
||||
| composer_cache_key | A key to version the composer cache. Can be incremented if you need to bust the cache. | false | \_mageos |
|
||||
|
||||
### Matrix Format
|
||||
|
||||
The Magento matrix format outlined by the [supported versions action.](https://github.com/graycoreio/github-actions-magento2/tree/main/supported-version/supported.json)
|
||||
|
||||
## Usage
|
||||
|
||||
```yml
|
||||
name: Unit Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
compute_matrix:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
matrix: ${{ steps.supported-version.outputs.matrix }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: graycoreio/github-actions-magento2/supported-version@main
|
||||
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@main
|
||||
with:
|
||||
matrix: ${{ needs.compute_matrix.outputs.matrix }}
|
||||
```
|
||||
@@ -0,0 +1,280 @@
|
||||
name: MageCheck Extension
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
path:
|
||||
type: string
|
||||
required: false
|
||||
default: "."
|
||||
description: "The folder of the Magento store or extension that you are testing."
|
||||
|
||||
magento_repository:
|
||||
type: string
|
||||
required: false
|
||||
default: "https://mirror.mage-os.org/"
|
||||
description: "Where to install Magento from"
|
||||
|
||||
matrix:
|
||||
type: string
|
||||
required: true
|
||||
description: "The matrix of Magento versions to test against"
|
||||
|
||||
fail-fast:
|
||||
type: boolean
|
||||
required: false
|
||||
default: true
|
||||
|
||||
composer_cache_key:
|
||||
type: string
|
||||
required: false
|
||||
default: "_mageos"
|
||||
description: A key to version the composer cache. Can be incremented if you need to bust the cache.
|
||||
|
||||
secrets:
|
||||
composer_auth:
|
||||
required: false
|
||||
description: "Your composer credentials (typically a stringified json object of the contents of your auth.json)"
|
||||
|
||||
jobs:
|
||||
unit-test-extension:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix: ${{ fromJSON(inputs.matrix) }}
|
||||
fail-fast: ${{ inputs.fail-fast }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- uses: graycoreio/github-actions-magento2/setup-magento@main
|
||||
id: setup-magento
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
tools: composer:v${{ matrix.composer }}
|
||||
mode: extension
|
||||
magento_version: ${{ matrix.magento }}
|
||||
magento_repository: ${{ inputs.magento_repository }}
|
||||
composer_auth: ${{ secrets.composer_auth }}
|
||||
|
||||
- uses: graycoreio/github-actions-magento2/cache-magento@main
|
||||
with:
|
||||
mode: extension
|
||||
composer_cache_key: ${{ inputs.composer_cache_key }}
|
||||
|
||||
- name: Add extension repository
|
||||
working-directory: ${{ steps.setup-magento.outputs.path }}
|
||||
run: composer config repositories.local path ${{ github.workspace }}/${{ inputs.path }}
|
||||
|
||||
- name: Get package name
|
||||
id: package
|
||||
run: echo "name=$(jq -r .name ${{ github.workspace }}/${{ inputs.path }}/composer.json)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Require extension
|
||||
working-directory: ${{ steps.setup-magento.outputs.path }}
|
||||
run: composer require "${{ steps.package.outputs.name }}:@dev" --no-install
|
||||
|
||||
- name: Composer install
|
||||
working-directory: ${{ steps.setup-magento.outputs.path }}
|
||||
run: composer install
|
||||
env:
|
||||
COMPOSER_AUTH: ${{ secrets.composer_auth }}
|
||||
|
||||
- name: Configure phpunit.xml.dist
|
||||
working-directory: ${{ steps.setup-magento.outputs.path }}
|
||||
run: |
|
||||
## Add the testsuite
|
||||
cat > /tmp/testsuite.xml << 'EOF'
|
||||
<testsuite name="Extension_Unit_Tests">
|
||||
<directory>../../../vendor/${{ steps.package.outputs.name }}/Test/Unit</directory>
|
||||
</testsuite>
|
||||
EOF
|
||||
sed -i '/<testsuites>/r /tmp/testsuite.xml' dev/tests/unit/phpunit.xml.dist
|
||||
|
||||
## Disable allure (See https://github.com/magento/magento2/issues/36702 )
|
||||
## (╯°□°)╯︵ ┻━┻
|
||||
sed -i '/<extensions>/,/<\/extensions>/d' dev/tests/unit/phpunit.xml.dist
|
||||
|
||||
- name: Run extension unit tests
|
||||
working-directory: ${{ steps.setup-magento.outputs.path }}
|
||||
run: vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist --testsuite Extension_Unit_Tests
|
||||
|
||||
compile-extension:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix: ${{ fromJSON(inputs.matrix) }}
|
||||
fail-fast: ${{ inputs.fail-fast }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- uses: graycoreio/github-actions-magento2/setup-magento@main
|
||||
id: setup-magento
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
tools: composer:v${{ matrix.composer }}
|
||||
mode: extension
|
||||
magento_version: ${{ matrix.magento }}
|
||||
magento_repository: ${{ inputs.magento_repository }}
|
||||
composer_auth: ${{ secrets.composer_auth }}
|
||||
|
||||
- uses: graycoreio/github-actions-magento2/cache-magento@main
|
||||
with:
|
||||
mode: extension
|
||||
composer_cache_key: ${{ inputs.composer_cache_key }}
|
||||
|
||||
- name: Add extension repository
|
||||
working-directory: ${{ steps.setup-magento.outputs.path }}
|
||||
run: composer config repositories.local path ${{ github.workspace }}/${{ inputs.path }}
|
||||
|
||||
- name: Get package name
|
||||
id: package
|
||||
run: echo "name=$(jq -r .name ${{ github.workspace }}/${{ inputs.path }}/composer.json)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Require extension
|
||||
working-directory: ${{ steps.setup-magento.outputs.path }}
|
||||
run: composer require "${{ steps.package.outputs.name }}:@dev" --no-install
|
||||
env:
|
||||
COMPOSER_AUTH: ${{ secrets.composer_auth }}
|
||||
|
||||
- name: Composer install
|
||||
working-directory: ${{ steps.setup-magento.outputs.path }}
|
||||
run: composer install
|
||||
env:
|
||||
COMPOSER_AUTH: ${{ secrets.composer_auth }}
|
||||
|
||||
- name: Enable all modules
|
||||
working-directory: ${{ steps.setup-magento.outputs.path }}
|
||||
run: php bin/magento module:enable --all
|
||||
|
||||
- name: Compile
|
||||
working-directory: ${{ steps.setup-magento.outputs.path }}
|
||||
run: php bin/magento setup:di:compile
|
||||
|
||||
coding-standard:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix: ${{ fromJSON(inputs.matrix) }}
|
||||
fail-fast: ${{ inputs.fail-fast }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Get Composer Version
|
||||
uses: graycoreio/github-actions-magento2/get-composer-version@main
|
||||
id: get-composer-version
|
||||
|
||||
- name: Check if allow-plugins option is available for this version of composer
|
||||
uses: graycoreio/github-actions-magento2/semver-compare@main
|
||||
with:
|
||||
version: 2.2
|
||||
compare_against: ${{ steps.get-composer-version.outputs.version }}
|
||||
id: is-allow-plugins-available
|
||||
|
||||
- name: Enable dealerdirect/phpcodesniffer-composer-installer plugin
|
||||
shell: bash
|
||||
working-directory: ${{ inputs.path }}
|
||||
run: composer config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true --global
|
||||
if: steps.is-allow-plugins-available.outputs.result < 1
|
||||
|
||||
- name: Install Coding Standard
|
||||
shell: bash
|
||||
working-directory: ${{ inputs.path }}
|
||||
run: composer require "magento/magento-coding-standard" "magento/php-compatibility-fork"
|
||||
env:
|
||||
COMPOSER_AUTH: ${{ secrets.composer_auth }}
|
||||
|
||||
- name: Register Coding Standard
|
||||
shell: bash
|
||||
working-directory: ${{ inputs.path }}
|
||||
run: vendor/bin/phpcs --config-set installed_paths vendor/magento/magento-coding-standard,vendor/magento/php-compatibility-fork
|
||||
|
||||
- name: Coding Standard Check
|
||||
shell: bash
|
||||
run: |
|
||||
if [ -f .phpcs.xml ] || [ -f phpcs.xml ] || [ -f .phpcs.xml.dist ] || [ -f phpcs.xml.dist ]; then
|
||||
./vendor/bin/phpcs .
|
||||
else
|
||||
./vendor/bin/phpcs --standard=Magento2 --ignore=*vendor/* .
|
||||
fi
|
||||
working-directory: ${{ inputs.path }}
|
||||
|
||||
integration_test:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix: ${{ fromJSON(inputs.matrix) }}
|
||||
fail-fast: ${{ inputs.fail-fast }}
|
||||
services: ${{ matrix.services }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- uses: graycoreio/github-actions-magento2/setup-magento@main
|
||||
id: setup-magento
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
tools: composer:v${{ matrix.composer }}
|
||||
mode: extension
|
||||
magento_version: ${{ matrix.magento }}
|
||||
magento_repository: ${{ inputs.magento_repository }}
|
||||
composer_auth: ${{ secrets.composer_auth }}
|
||||
|
||||
- uses: graycoreio/github-actions-magento2/cache-magento@main
|
||||
with:
|
||||
mode: extension
|
||||
composer_cache_key: ${{ inputs.composer_cache_key }}
|
||||
|
||||
- name: Add extension repository
|
||||
working-directory: ${{ steps.setup-magento.outputs.path }}
|
||||
run: composer config repositories.local path ${{ github.workspace }}/${{ inputs.path }}
|
||||
|
||||
- name: Get package name
|
||||
id: package
|
||||
run: echo "name=$(jq -r .name ${{ github.workspace }}/${{ inputs.path }}/composer.json)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Require extension
|
||||
working-directory: ${{ steps.setup-magento.outputs.path }}
|
||||
run: composer require "${{ steps.package.outputs.name }}:@dev" --no-install
|
||||
env:
|
||||
COMPOSER_AUTH: ${{ secrets.composer_auth }}
|
||||
|
||||
- name: Composer install
|
||||
working-directory: ${{ steps.setup-magento.outputs.path }}
|
||||
run: composer install
|
||||
env:
|
||||
COMPOSER_AUTH: ${{ secrets.composer_auth }}
|
||||
|
||||
- uses: graycoreio/github-actions-magento2/get-magento-version@main
|
||||
id: magento-version
|
||||
with:
|
||||
working-directory: ${{ steps.setup-magento.outputs.path }}
|
||||
|
||||
- name: Replace Configuration Settings for env
|
||||
working-directory: ${{ steps.setup-magento.outputs.path }}/dev/tests/integration
|
||||
run: |
|
||||
sed -i "s/'db-host' => 'localhost'/'db-host' => '127.0.0.1'/" etc/install-config-mysql.php.dist
|
||||
sed -i "s/'db-user' => 'root'/'db-user' => 'user'/" etc/install-config-mysql.php.dist
|
||||
sed -i "s/'db-password' => '123123q'/'db-password' => 'password'/" etc/install-config-mysql.php.dist
|
||||
sed -i "s/'elasticsearch-host' => 'localhost'/'elasticsearch-host' => '127.0.0.1'/" etc/install-config-mysql.php.dist
|
||||
sed -i "s/'amqp-host' => 'localhost'/'amqp-host' => '127.0.0.1'/" etc/install-config-mysql.php.dist
|
||||
|
||||
- name: Enable log-bin-trust-function-creators
|
||||
run: |
|
||||
mysql -h127.0.0.1 -uroot -prootpassword -e "SET GLOBAL log_bin_trust_function_creators = 1;"
|
||||
|
||||
- name: Configure phpunit.xml.dist
|
||||
working-directory: ${{ steps.setup-magento.outputs.path }}
|
||||
run: |
|
||||
## Add the testsuite
|
||||
cat > /tmp/testsuite.xml << 'EOF'
|
||||
<testsuite name="Extension_Integration_Tests">
|
||||
<directory>../../../vendor/${{ steps.package.outputs.name }}/Test/Integration</directory>
|
||||
</testsuite>
|
||||
EOF
|
||||
sed -i '/<testsuites>/r /tmp/testsuite.xml' dev/tests/integration/phpunit.xml.dist
|
||||
|
||||
- name: Run Integration Tests
|
||||
working-directory: ${{ steps.setup-magento.outputs.path }}/dev/tests/integration
|
||||
run: ../../../vendor/bin/phpunit -c phpunit.xml.dist --testsuite Extension_Integration_Tests
|
||||
|
||||
- name: Upload test sandbox dir
|
||||
uses: actions/upload-artifact@v6
|
||||
if: failure()
|
||||
with:
|
||||
name: sandbox-data-${{ steps.magento-version.outputs.version }}
|
||||
path: ${{ steps.setup-magento.outputs.path }}/dev/tests/integration/tmp/sandbox-*
|
||||
retention-days: 3
|
||||
@@ -8,9 +8,10 @@ See the [integration.yaml](./integration.yaml)
|
||||
|
||||
| Input | Description | Required | Default |
|
||||
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ----------------------------- |
|
||||
| matrix | JSON string of [version matrix for Magento](./#matrix-format) | true | NULL |
|
||||
| matrix | JSON string of [version matrix for Magento](./#matrix-format). Must include a `services` key (pass `include_services: true` to the supported-version action). | true | NULL |
|
||||
| fail-fast | Same as Github's [fail-fast](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategyfail-fast) | false | true |
|
||||
| package_name | The name of the package | true | NULL |
|
||||
| use_local_source | Whether or not you want to test your local package or not. | false | true |
|
||||
| source_folder | The source folder of the package | false | $GITHUB_WORKSPACE |
|
||||
| magento_directory | The folder where Magento will be installed | false | ../magento2 |
|
||||
| magento_repository | Where to install Magento from | false | https://mirror.mage-os.org/ |
|
||||
@@ -20,7 +21,7 @@ See the [integration.yaml](./integration.yaml)
|
||||
## Secrets
|
||||
| Input | Description | Required | Default |
|
||||
| ------------- | --------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------- |
|
||||
| composer_auth | JSON string of [composer credentials]([#./matrix-format](https://devdocs.magento.com/guides/v2.4/install-gde/prereq/connect-auth.html)) | false | NULL |
|
||||
| composer_auth | JSON string of [composer credentials](https://devdocs.magento.com/guides/v2.4/install-gde/prereq/connect-auth.html) | false | NULL |
|
||||
|
||||
### Matrix Format
|
||||
|
||||
@@ -46,10 +47,11 @@ jobs:
|
||||
outputs:
|
||||
matrix: ${{ steps.supported-version.outputs.matrix }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v6
|
||||
- uses: graycoreio/github-actions-magento2/supported-version@main
|
||||
with:
|
||||
include_services: true
|
||||
id: supported-version
|
||||
- run: echo ${{ steps.supported-version.outputs.matrix }}
|
||||
integration-workflow:
|
||||
needs: compute_matrix
|
||||
uses: graycoreio/github-actions-magento2/.github/workflows/integration.yaml@main
|
||||
|
||||
@@ -59,42 +59,12 @@ on:
|
||||
jobs:
|
||||
integration_test:
|
||||
runs-on: ${{ matrix.os }}
|
||||
services: ${{ matrix.services }}
|
||||
strategy:
|
||||
fail-fast: ${{ inputs.fail-fast }}
|
||||
matrix: ${{ fromJSON(inputs.matrix) }}
|
||||
services:
|
||||
elasticsearch:
|
||||
image: ${{ matrix.elasticsearch }}
|
||||
env:
|
||||
discovery.type: single-node
|
||||
options: >-
|
||||
--health-cmd "curl http://localhost:9200/_cluster/health"
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 10
|
||||
ports:
|
||||
- 9200:9200
|
||||
|
||||
mysql:
|
||||
image: ${{ matrix.mysql }}
|
||||
env:
|
||||
MYSQL_DATABASE: magento_integration_tests
|
||||
MYSQL_USER: user
|
||||
MYSQL_PASSWORD: password
|
||||
MYSQL_ROOT_PASSWORD: rootpassword
|
||||
ports:
|
||||
- 3306:3306
|
||||
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
||||
|
||||
rabbitmq:
|
||||
image: ${{ matrix.rabbitmq }}
|
||||
env:
|
||||
RABBITMQ_DEFAULT_USER: guest
|
||||
RABBITMQ_DEFAULT_PASS: guest
|
||||
ports:
|
||||
- 5672:5672
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v6
|
||||
- name: Set PHP Version
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
@@ -102,31 +72,31 @@ jobs:
|
||||
tools: composer:v${{ matrix.composer }}
|
||||
coverage: none
|
||||
|
||||
- name: Allow SQL triggers
|
||||
run: |
|
||||
mysql --host 127.0.0.1 --port ${{ job.services.mysql.ports['3306'] }} -u root -prootpassword -e "set global log_bin_trust_function_creators=1;"
|
||||
|
||||
- run: composer create-project --repository-url="${{ inputs.magento_repository }}" "${{ matrix.magento }}" ${{ inputs.magento_directory }} --no-install
|
||||
shell: bash
|
||||
env:
|
||||
COMPOSER_AUTH: ${{ secrets.composer_auth }}
|
||||
name: Create Magento ${{ matrix.magento }} Project
|
||||
|
||||
- run: |
|
||||
echo "::set-output name=version::$(cat composer.json | jq '.require
|
||||
| with_entries( select(.key == "magento/product-community-edition" or .key == "magento/product-enterprise-edition") )
|
||||
| to_entries
|
||||
| .[0].value')"
|
||||
shell: bash
|
||||
working-directory: ${{ inputs.magento_directory }}
|
||||
name: Compute Installable Magento version
|
||||
- uses: graycoreio/github-actions-magento2/get-magento-version@main
|
||||
id: magento-version
|
||||
with:
|
||||
working-directory: ${{ inputs.magento_directory }}
|
||||
|
||||
- name: Get Composer Cache Directory
|
||||
shell: bash
|
||||
working-directory: ${{ inputs.magento_directory }}
|
||||
id: composer-cache
|
||||
run: |
|
||||
echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||
|
||||
|
||||
- name: "Cache Composer Packages"
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
key: "composer | v5 | ${{ inputs.composer_cache_key }} | ${{ hashFiles('composer.lock') }} | ${{ matrix.os }} | ${{ matrix.composer }} | ${{ matrix.php }} | ${{ matrix.magento }}"
|
||||
path: ${{ steps.composer-cache.outputs.dir }}
|
||||
@@ -180,6 +150,41 @@ jobs:
|
||||
sed -i "s/'elasticsearch-host' => 'localhost'/'elasticsearch-host' => '127.0.0.1'/" etc/install-config-mysql.php.dist
|
||||
sed -i "s/'amqp-host' => 'localhost'/'amqp-host' => '127.0.0.1'/" etc/install-config-mysql.php.dist
|
||||
|
||||
# mysql server 5.7 doesn't have the column-statistics expected by mysql client 8 (failing 2.3.7-p* builds)
|
||||
# ref: https://gist.github.com/tobias-khs/8dcf82f719a2b3a7c3b9604b4df53bbf
|
||||
- name: Switch from mysql-client 8 to mysql-client 5.7
|
||||
if: |
|
||||
steps.magento-version.outputs.version == '"2.3.7-p3"' || steps.magento-version.outputs.version == '"2.3.7-p4"'
|
||||
run: |
|
||||
mkdir -p /tmp/mysql-5.7
|
||||
cd /tmp/mysql-5.7
|
||||
sudo apt-get purge mysql-server mysql-client mysql-common mysql-server-core-* mysql-client-core-*
|
||||
sudo rm -rf /etc/mysql /var/lib/mysql
|
||||
sudo apt-get autoremove
|
||||
sudo apt-get autoclean
|
||||
wget --quiet https://downloads.mysql.com/archives/get/p/23/file/mysql-server_5.7.30-1ubuntu18.04_amd64.deb-bundle.tar
|
||||
tar -xf mysql-server_5.7.30-1ubuntu18.04_amd64.deb-bundle.tar
|
||||
sudo dpkg -i mysql-common_5.7.30-1ubuntu18.04_amd64.deb
|
||||
sudo dpkg -i libmysqlclient20_5.7.30-1ubuntu18.04_amd64.deb
|
||||
sudo dpkg -i mysql-community-client_5.7.30-1ubuntu18.04_amd64.deb
|
||||
sudo dpkg -i mysql-client_5.7.30-1ubuntu18.04_amd64.deb
|
||||
sudo dpkg -i libmysqlclient20_5.7.30-1ubuntu18.04_amd64.deb
|
||||
mysqldump --version
|
||||
|
||||
- name: Enable log-bin-trust-function-creators
|
||||
run: |
|
||||
mysql -h127.0.0.1 -uroot -prootpassword -e "SET GLOBAL log_bin_trust_function_creators = 1;"
|
||||
|
||||
|
||||
- run: ${{ inputs.test_command }}
|
||||
working-directory: ${{ inputs.magento_directory }}/dev/tests/integration
|
||||
name: Run Integration Tests
|
||||
|
||||
- name: Upload test sandbox dir
|
||||
uses: actions/upload-artifact@v6
|
||||
if: failure()
|
||||
with:
|
||||
name: sandbox-data-${{ steps.magento-version.outputs.version }}
|
||||
path: /home/runner/work/infrastructure/magento2/dev/tests/integration/tmp/sandbox-*
|
||||
retention-days: 3
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
name: Create Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
release-please:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: googleapis/release-please-action@v4
|
||||
with:
|
||||
token: ${{ secrets.GRAYCORE_GITHUB_TOKEN }}
|
||||
@@ -0,0 +1 @@
|
||||
{".":"6.0.0"}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"dbaeumer.vscode-eslint"
|
||||
]
|
||||
}
|
||||
+253
@@ -2,6 +2,259 @@
|
||||
|
||||
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.
|
||||
|
||||
## [6.0.0](https://github.com/graycoreio/github-actions-magento2/compare/v5.1.0...v6.0.0) (2026-03-11)
|
||||
|
||||
|
||||
### ⚠ BREAKING CHANGES
|
||||
|
||||
* **supported-version:** Adobe has dropped support for elasticsearch and redis in their latest releases of v2.4.8.
|
||||
|
||||
### Features
|
||||
|
||||
* **supported-version:** add support for MageOS 2.2.0 ([b4526db](https://github.com/graycoreio/github-actions-magento2/commit/b4526dbb52f59ad79b07fedb5fe487424c0b4dea))
|
||||
* **supported-version:** update for Magento v2.4.8-p4 release ([e6be791](https://github.com/graycoreio/github-actions-magento2/commit/e6be791eed5d2b4f83bb56391e7eab39c52eed59))
|
||||
* **supported-version:** upgrade opensearch to 2.19.5 ([7e40a62](https://github.com/graycoreio/github-actions-magento2/commit/7e40a62efaff0c31fab1284980fc5400997b211f))
|
||||
|
||||
## [5.1.0](https://github.com/graycoreio/github-actions-magento2/compare/v5.0.0...v5.1.0) (2026-02-19)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **supported-version:** backport composer 2.9.3 to older mage-os verisons ([48902e8](https://github.com/graycoreio/github-actions-magento2/commit/48902e8e6a748a1328a0e50eff32e717a560975c))
|
||||
* **supported-version:** bump all composer versions to latest supported version ([c26e84f](https://github.com/graycoreio/github-actions-magento2/commit/c26e84f69361cd53dce853b415656f3af9b44427))
|
||||
* **supported-version:** bump all nginx versions to latest supported version ([c19912d](https://github.com/graycoreio/github-actions-magento2/commit/c19912dc4bfc83f4649bbd6bff8b8e9366384906))
|
||||
* **supported-versions:** upgrade 2.4.8-p2/p3 to opensearch 3 ([d29e574](https://github.com/graycoreio/github-actions-magento2/commit/d29e57447582250203ee5cbad561306ca6080ffa))
|
||||
* **supported-version:** updated matrix for Mage-OS 2.1.0 ([07f8953](https://github.com/graycoreio/github-actions-magento2/commit/07f89530df8396d359c043c6b3a8b429a67465a8))
|
||||
* **supported-version:** upgrade to compsoer 2.9.5 ([7e70ee9](https://github.com/graycoreio/github-actions-magento2/commit/7e70ee93efb85c48ef312cf4f796bc90acc1b9cf))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **supported-version:** pin specific composer 2 versions for historic Magento releases ([505179c](https://github.com/graycoreio/github-actions-magento2/commit/505179ce7bdf1b41472d9ba735cc36002b84e2a0))
|
||||
* using `latest` accidentally output two versions for Magento Open Source ([34ddee6](https://github.com/graycoreio/github-actions-magento2/commit/34ddee6aef5e21f1e4bfa992ff333031b7552c35))
|
||||
|
||||
## [5.0.0](https://github.com/graycoreio/github-actions-magento2/compare/v4.0.1...v5.0.0) (2026-02-18)
|
||||
|
||||
|
||||
### ⚠ BREAKING CHANGES
|
||||
|
||||
* remove unmaintained setup-di-compile action
|
||||
|
||||
### Features
|
||||
|
||||
* remove unmaintained setup-di-compile action ([7b5ccf7](https://github.com/graycoreio/github-actions-magento2/commit/7b5ccf7d9d67da8c67e77b222b89b0abf332b183))
|
||||
* use actions/cache@v5 ([86b01b1](https://github.com/graycoreio/github-actions-magento2/commit/86b01b17faf443802bdf827fdbb706c55ae7e3fb))
|
||||
* use actions/checkout@v6 ([c2c3755](https://github.com/graycoreio/github-actions-magento2/commit/c2c375572967ee6ff8afc3a406b8d5a02880159e))
|
||||
* use actions/upload-artifact@v6 ([5f3ba73](https://github.com/graycoreio/github-actions-magento2/commit/5f3ba73bc67a5c09e22f83c6e51421596103e0ce))
|
||||
|
||||
## [4.0.1](https://github.com/graycoreio/github-actions-magento2/compare/v4.0.0...v4.0.1) (2025-12-16)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **supported-version:** handle semver-ish values from old magento verisons ([7c0bc65](https://github.com/graycoreio/github-actions-magento2/commit/7c0bc65842e0e866cd957a44f879d37d04d11dce))
|
||||
|
||||
## [4.0.0](https://github.com/graycoreio/github-actions-magento2/compare/v3.0.0...v4.0.0) (2025-12-15)
|
||||
|
||||
|
||||
### ⚠ BREAKING CHANGES
|
||||
|
||||
* **integration:** use services from supported-version ([#207](https://github.com/graycoreio/github-actions-magento2/issues/207))
|
||||
* **unit-test:** set default unit-test php version to 8.4
|
||||
* **supported-version:** upgrade to use node24
|
||||
|
||||
### Features
|
||||
|
||||
* **check-extension:** add coding standard ([#203](https://github.com/graycoreio/github-actions-magento2/issues/203)) ([da59af2](https://github.com/graycoreio/github-actions-magento2/commit/da59af27fa8aa088a53f5e99b834ed8b88959395))
|
||||
* **check-extension:** add integration tests ([#205](https://github.com/graycoreio/github-actions-magento2/issues/205)) ([87b8b80](https://github.com/graycoreio/github-actions-magento2/commit/87b8b80febfa50df4107623942627079d4f12850))
|
||||
* **check-extension:** add new check-extension workflow ([#201](https://github.com/graycoreio/github-actions-magento2/issues/201)) ([1ab0330](https://github.com/graycoreio/github-actions-magento2/commit/1ab0330f1f9f7663dec418d22c2674eaf599cc35))
|
||||
* **check-extension:** add setup:di:compile test ([#202](https://github.com/graycoreio/github-actions-magento2/issues/202)) ([0c244f2](https://github.com/graycoreio/github-actions-magento2/commit/0c244f2f2891e3b8250b12c66781981775cbeb09))
|
||||
* **check-extension:** prefer phpcs conf if it exists ([810a570](https://github.com/graycoreio/github-actions-magento2/commit/810a5705cfc5fafa8230214ab84a44fc86de5baf))
|
||||
* **extension-check:** support composer auth ([#204](https://github.com/graycoreio/github-actions-magento2/issues/204)) ([886bbbb](https://github.com/graycoreio/github-actions-magento2/commit/886bbbb9ba2cb296c9f945e37bcd2669864384af))
|
||||
* **integration:** use services from supported-version ([#207](https://github.com/graycoreio/github-actions-magento2/issues/207)) ([5fb9523](https://github.com/graycoreio/github-actions-magento2/commit/5fb9523081c1f6e353320c4540d609ce735cf474))
|
||||
* **supported-version:** Add 2.4.5-p14, 2.4.6-p12, 2.4.7-p7 and 2.4.8-p2 ([#295](https://github.com/graycoreio/github-actions-magento2/issues/295)) ([499eb24](https://github.com/graycoreio/github-actions-magento2/commit/499eb24a13ed9f783c4af7ffac5bd5339c357774))
|
||||
* **supported-version:** add optional services output for each matrix entry ([#206](https://github.com/graycoreio/github-actions-magento2/issues/206)) ([9c1dbc7](https://github.com/graycoreio/github-actions-magento2/commit/9c1dbc7d072a9864f9eb1d1a6219b8aaa99f0bcd))
|
||||
* **supported-versions:** 1.3.1 ([#297](https://github.com/graycoreio/github-actions-magento2/issues/297)) ([a8e8db3](https://github.com/graycoreio/github-actions-magento2/commit/a8e8db3572abfabfd64a5a701f62b630aabc3260))
|
||||
* **supported-versions:** update matrix for Magento 2.4.8-p3, 2.4.7-p8, 2.4.6-p13 ([#301](https://github.com/graycoreio/github-actions-magento2/issues/301)) ([e99b140](https://github.com/graycoreio/github-actions-magento2/commit/e99b140104280b87fd23e482f86b45442e7a6167))
|
||||
* **supported-version:** update matrix for Mage-OS 2.0.0 ([#298](https://github.com/graycoreio/github-actions-magento2/issues/298)) ([b0a3bea](https://github.com/graycoreio/github-actions-magento2/commit/b0a3bea8e4d0fbead1e5a7eab72d56a025845049))
|
||||
* **supported-version:** upgrade to use node24 ([3ef4318](https://github.com/graycoreio/github-actions-magento2/commit/3ef43188b22ccc25226e7e39bfbe5d5ee2599a58))
|
||||
* **unit-test:** set default unit-test php version to 8.4 ([8a95e72](https://github.com/graycoreio/github-actions-magento2/commit/8a95e723df2aec4a5a528189e2df73aebe9ad148))
|
||||
* updated supported-version matrix for Mage-OS release 1.2.0 ([f546006](https://github.com/graycoreio/github-actions-magento2/commit/f5460068b60334f81a186235c67c8239ab2f6e14))
|
||||
* upgrade setup-magento action test to v2.4.8-p3 ([#198](https://github.com/graycoreio/github-actions-magento2/issues/198)) ([6c31728](https://github.com/graycoreio/github-actions-magento2/commit/6c31728af28fbf37cebc296192ee10367dcdd546))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 'invalid kind provided' when defining `usable` type ([#305](https://github.com/graycoreio/github-actions-magento2/issues/305)) ([c057552](https://github.com/graycoreio/github-actions-magento2/commit/c05755261db8ae7f335d559bea60c231b04bfc5b))
|
||||
* allow matrix testing without EOL versions ([#299](https://github.com/graycoreio/github-actions-magento2/issues/299)) ([5608271](https://github.com/graycoreio/github-actions-magento2/commit/5608271fe3546ed7ed6d94e33b3984b3bb8dbfd6))
|
||||
* **supported-verison:** upstream version for Mage-OS 2.0.0 ([#302](https://github.com/graycoreio/github-actions-magento2/issues/302)) ([5fd96b9](https://github.com/graycoreio/github-actions-magento2/commit/5fd96b988e2f3576aa5b7add7fa5c9018ad35416))
|
||||
* **supported-version:** adjust correct key for mage-os/project-community-edition:>=1.2 <1.3 ([e12d993](https://github.com/graycoreio/github-actions-magento2/commit/e12d9937614ebd8537ce791e1cf2c34672716871))
|
||||
|
||||
## [3.0.0](https://github.com/graycoreio/github-actions-magento2/compare/v2.0.0...v3.0.0) (2025-04-09)
|
||||
|
||||
|
||||
### ⚠ BREAKING CHANGES
|
||||
|
||||
* **coding-standard:** use magento/php-compatibility-fork ([#190](https://github.com/graycoreio/github-actions-magento2/issues/190))
|
||||
|
||||
### Features
|
||||
|
||||
* **setup-magento:** add support for composer auth ([#193](https://github.com/graycoreio/github-actions-magento2/issues/193)) ([01cbea1](https://github.com/graycoreio/github-actions-magento2/commit/01cbea18c9649984893afd432a1cdfa4568a5273))
|
||||
* **supported-version:** add recent kind ([#188](https://github.com/graycoreio/github-actions-magento2/issues/188)) ([2f1b2ea](https://github.com/graycoreio/github-actions-magento2/commit/2f1b2eaa5da485a687ecda0fdbf38055e13c5a86))
|
||||
* **supported-version:** add v2.4.4-p13, v2.4.5-p12, v2.4.6-p10, v2.4.7-p5 and v2.4.8 ([#187](https://github.com/graycoreio/github-actions-magento2/issues/187)) ([21c3bb3](https://github.com/graycoreio/github-actions-magento2/commit/21c3bb34363c94003bf031f837c1599b8e08f25b))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **coding-standard:** use magento/php-compatibility-fork ([#190](https://github.com/graycoreio/github-actions-magento2/issues/190)) ([0008e86](https://github.com/graycoreio/github-actions-magento2/commit/0008e8642db9b997005c3848cf532f4b1cf0a17d))
|
||||
* **supported-version:** adjust failing tests ([#195](https://github.com/graycoreio/github-actions-magento2/issues/195)) ([f48c544](https://github.com/graycoreio/github-actions-magento2/commit/f48c544053e49d76c4ac5aac6743ee6521a700aa))
|
||||
|
||||
## [2.0.0](https://github.com/graycoreio/github-actions-magento2/compare/v1.6.0...v2.0.0) (2025-03-25)
|
||||
|
||||
|
||||
### ⚠ BREAKING CHANGES
|
||||
|
||||
* replace mage-os/github-actions with graycoreio/github-actions-magento2
|
||||
* remove unmaintained workflows
|
||||
|
||||
### Features
|
||||
|
||||
* add `cache-magento` action ([#87](https://github.com/graycoreio/github-actions-magento2/issues/87)) ([f5d43a5](https://github.com/graycoreio/github-actions-magento2/commit/f5d43a5184d20dc60b5e45d47b9d14300eb14754))
|
||||
* add `fix-magento` action ([#86](https://github.com/graycoreio/github-actions-magento2/issues/86)) ([856d2df](https://github.com/graycoreio/github-actions-magento2/commit/856d2df4819a5d0cdff6087a005ca966c7d409c0))
|
||||
* add coding standard action ([#51](https://github.com/graycoreio/github-actions-magento2/issues/51)) ([2a102c2](https://github.com/graycoreio/github-actions-magento2/commit/2a102c253d319fc463b1006ea7cc020b2ffdcb6c))
|
||||
* add Installation Test Action ([#1](https://github.com/graycoreio/github-actions-magento2/issues/1)) ([4bc0854](https://github.com/graycoreio/github-actions-magento2/commit/4bc0854cfcc6f527c678f8e712f79500524efde6))
|
||||
* add integration test workflow ([#3](https://github.com/graycoreio/github-actions-magento2/issues/3)) ([d638c02](https://github.com/graycoreio/github-actions-magento2/commit/d638c02ecab005d2541d0480522d4c5e823156f2))
|
||||
* add magento releases 2.4.4-p9, 2.4.5-p8, 2.4.6-p6, and 2.4.7-p1 ([#226](https://github.com/graycoreio/github-actions-magento2/issues/226)) ([a326271](https://github.com/graycoreio/github-actions-magento2/commit/a3262710f1f605bf468b6fe70d5f1a5bd47b6bb4))
|
||||
* add matrix to integration-test workflow ([#7](https://github.com/graycoreio/github-actions-magento2/issues/7)) ([fb1ac5f](https://github.com/graycoreio/github-actions-magento2/commit/fb1ac5f41aa183408aa32ec944536cf225831191))
|
||||
* add new releases to the version matrix ([#232](https://github.com/graycoreio/github-actions-magento2/issues/232)) ([b633b21](https://github.com/graycoreio/github-actions-magento2/commit/b633b2120a2157aa13c3e7dd71b1cdbc0045e5d9))
|
||||
* add project versions ([#110](https://github.com/graycoreio/github-actions-magento2/issues/110)) ([f7f0504](https://github.com/graycoreio/github-actions-magento2/commit/f7f0504691b19689227b4db17d333bca62f80cc0))
|
||||
* add rabbitmq images with management plugin ([#125](https://github.com/graycoreio/github-actions-magento2/issues/125)) ([0f31e40](https://github.com/graycoreio/github-actions-magento2/commit/0f31e401b775c085720176a4ac7626c45d2b07d0))
|
||||
* add releases 2.4.4-p6, 2.4.5-p5 and 2.4.6-p3 ([#169](https://github.com/graycoreio/github-actions-magento2/issues/169)) ([2086708](https://github.com/graycoreio/github-actions-magento2/commit/2086708ffc708b7685b579027163340a4ddfa44f))
|
||||
* add runner version to supported version ([#7](https://github.com/graycoreio/github-actions-magento2/issues/7)) ([dd1a36b](https://github.com/graycoreio/github-actions-magento2/commit/dd1a36b2345cd9596b5d2688d5c6e1bc8725ffbd))
|
||||
* add support for v2.3.7 on new vms ([#67](https://github.com/graycoreio/github-actions-magento2/issues/67)) ([2824849](https://github.com/graycoreio/github-actions-magento2/commit/28248496e0979dff3cb255abbfff84cdebd5697b))
|
||||
* add support for v2.4.4-p2 and v2.4.5-p1 ([#69](https://github.com/graycoreio/github-actions-magento2/issues/69)) ([3e4d3c1](https://github.com/graycoreio/github-actions-magento2/commit/3e4d3c1645ad3ed8b2b0134f4c012335421c5fcb))
|
||||
* add supported version matrix action ([#6](https://github.com/graycoreio/github-actions-magento2/issues/6)) ([6e81ef9](https://github.com/graycoreio/github-actions-magento2/commit/6e81ef96c7a0c8a1aa59554bf20ab202d7da4140))
|
||||
* add unit test action ([#2](https://github.com/graycoreio/github-actions-magento2/issues/2)) ([72b1f25](https://github.com/graycoreio/github-actions-magento2/commit/72b1f25310b4918b4702526e2b45d5e99f063ebb))
|
||||
* add upcoming release for mage-os 1.0.2 ([#223](https://github.com/graycoreio/github-actions-magento2/issues/223)) ([f1b13e8](https://github.com/graycoreio/github-actions-magento2/commit/f1b13e8984ec13e1a154e737c8494470f88b9a21))
|
||||
* add upcoming release Mage-OS 1.0.3 to supported-version matrix ([#229](https://github.com/graycoreio/github-actions-magento2/issues/229)) ([6e50d0d](https://github.com/graycoreio/github-actions-magento2/commit/6e50d0d8de09da49ce12473b2577a2277e4d701e))
|
||||
* allow fail-fast as an input argument ([#25](https://github.com/graycoreio/github-actions-magento2/issues/25)) ([2405cd1](https://github.com/graycoreio/github-actions-magento2/commit/2405cd1db7ff70a00c2e1ce58a20d0834bb39f33))
|
||||
* allow using "next" version on supported version ([#58](https://github.com/graycoreio/github-actions-magento2/issues/58)) ([7431dcb](https://github.com/graycoreio/github-actions-magento2/commit/7431dcb7af723a6be20ef30db0f6978afacc572c))
|
||||
* automatically allow the default Magento composer plugins ([#12](https://github.com/graycoreio/github-actions-magento2/issues/12)) ([d6e6688](https://github.com/graycoreio/github-actions-magento2/commit/d6e6688ead710b705198e7a7d1eda7004dc86070))
|
||||
* **coding-standard:** add `ignore_warnings` flag ([#147](https://github.com/graycoreio/github-actions-magento2/issues/147)) ([4e21b18](https://github.com/graycoreio/github-actions-magento2/commit/4e21b18ee9187253fc5d172d0ad1439bf304872e))
|
||||
* **get-composer-version:** create new action ([#145](https://github.com/graycoreio/github-actions-magento2/issues/145)) ([bc840e1](https://github.com/graycoreio/github-actions-magento2/commit/bc840e13727b4273aa9c22e4116a05cde58b046d))
|
||||
* **get-magento-version:** add get-magento-version action ([#72](https://github.com/graycoreio/github-actions-magento2/issues/72)) ([fd858c3](https://github.com/graycoreio/github-actions-magento2/commit/fd858c30633e97bdc93cc8c2fe7adaef99a6bf7c))
|
||||
* install composer via shivammathur/setup-php github action ([#23](https://github.com/graycoreio/github-actions-magento2/issues/23)) ([49bbcc8](https://github.com/graycoreio/github-actions-magento2/commit/49bbcc89a7d7103fda34820ab165ec2cd1366123))
|
||||
* **integration:** fix integration tests for v2.4.0 ([#46](https://github.com/graycoreio/github-actions-magento2/issues/46)) ([b4e7831](https://github.com/graycoreio/github-actions-magento2/commit/b4e7831c93ad82caa0abe3bdce52e4af2eda333b))
|
||||
* **integration:** Install composer plugin for parallel downloads ([#24](https://github.com/graycoreio/github-actions-magento2/issues/24)) ([97b4223](https://github.com/graycoreio/github-actions-magento2/commit/97b4223c0c1f441b5567ca606bff84181218d03a))
|
||||
* make cache key consistent (and configurable) ([#38](https://github.com/graycoreio/github-actions-magento2/issues/38)) ([cbbba62](https://github.com/graycoreio/github-actions-magento2/commit/cbbba628dd290c81ed4708d3d3bb87abadb0c7ce))
|
||||
* make phpcs severity level configurable ([#130](https://github.com/graycoreio/github-actions-magento2/issues/130)) ([81a1eb2](https://github.com/graycoreio/github-actions-magento2/commit/81a1eb2273864842286a4427519c9d29146c5ac8))
|
||||
* remove COMPOSER_AUTH requirement ([#18](https://github.com/graycoreio/github-actions-magento2/issues/18)) ([e92a242](https://github.com/graycoreio/github-actions-magento2/commit/e92a242f0af477623421949ade130ab316281142))
|
||||
* remove unmaintained workflows ([4c536e3](https://github.com/graycoreio/github-actions-magento2/commit/4c536e3d96f78355ed7b37388564f3468040172b))
|
||||
* replace mage-os/github-actions with graycoreio/github-actions-magento2 ([9c06178](https://github.com/graycoreio/github-actions-magento2/commit/9c06178b30d156338b5ced8bd8bdbaec79982291))
|
||||
* run setup:di:compile on push ([#116](https://github.com/graycoreio/github-actions-magento2/issues/116)) ([22aca78](https://github.com/graycoreio/github-actions-magento2/commit/22aca78cc8c648549b7a139fd2739ac9e8db916d))
|
||||
* **semver-compare:** add new Github action ([#146](https://github.com/graycoreio/github-actions-magento2/issues/146)) ([01e4ccb](https://github.com/graycoreio/github-actions-magento2/commit/01e4ccbc54ebe8996c3f25d777a0b4fdc1288e13))
|
||||
* **setup-magento:** add a new action to setup Magento ([#76](https://github.com/graycoreio/github-actions-magento2/issues/76)) ([7b74ff7](https://github.com/graycoreio/github-actions-magento2/commit/7b74ff738699d86aafed7690464302b1f07e59d0))
|
||||
* **supported-version:** add all kind ([#36](https://github.com/graycoreio/github-actions-magento2/issues/36)) ([26c354d](https://github.com/graycoreio/github-actions-magento2/commit/26c354d8d4d1f7ce689f37236b7b0ee27b11221f))
|
||||
* **supported-version:** add support for v2.4.5 ([#35](https://github.com/graycoreio/github-actions-magento2/issues/35)) ([affb1ce](https://github.com/graycoreio/github-actions-magento2/commit/affb1ce1f942799647f57eb6b1096bf0e4afd560))
|
||||
* **supported-version:** add user-defined kind ([#28](https://github.com/graycoreio/github-actions-magento2/issues/28)) ([664360e](https://github.com/graycoreio/github-actions-magento2/commit/664360ede2ef775a6e0c7876dd103e66a977c4eb))
|
||||
* **supported-version:** dynamically compute ([#120](https://github.com/graycoreio/github-actions-magento2/issues/120)) ([dbc889f](https://github.com/graycoreio/github-actions-magento2/commit/dbc889f7cea548d319a5cd206269b007319d53ec))
|
||||
* **supported-version:** Magento v2.4.6 ([d3b1ab6](https://github.com/graycoreio/github-actions-magento2/commit/d3b1ab6b344b6a1ff705d2e57ad400ab506456be))
|
||||
* **supported-version:** package @actions/core:1.10.0 ([e4f0f85](https://github.com/graycoreio/github-actions-magento2/commit/e4f0f85e38ac6e342780d2bdaac28a19c1cab49d))
|
||||
* **supported-versions:** add release date ([#100](https://github.com/graycoreio/github-actions-magento2/issues/100)) ([5599a0d](https://github.com/graycoreio/github-actions-magento2/commit/5599a0d2e790952fbdfbbc23b9a1c92aa26eed35))
|
||||
* **supported-version:** validate custom_versions ([5c19804](https://github.com/graycoreio/github-actions-magento2/commit/5c198049f7002fff785d07f344f3773ce92e2c0f))
|
||||
* update actions/checkout to v3 ([#23](https://github.com/graycoreio/github-actions-magento2/issues/23)) ([8a209b9](https://github.com/graycoreio/github-actions-magento2/commit/8a209b982b5dbf22b6f620d9c6061577e29d0dcb))
|
||||
* use Mage-OS by default ([#17](https://github.com/graycoreio/github-actions-magento2/issues/17)) ([d1cced8](https://github.com/graycoreio/github-actions-magento2/commit/d1cced897a3008e53b4e3b9827d9c9853d70cfa4))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* add missing build for 1.4.0 of supported versions ([#64](https://github.com/graycoreio/github-actions-magento2/issues/64)) ([e48a346](https://github.com/graycoreio/github-actions-magento2/commit/e48a3463c5054012f748bb64eca2bab51220cdc0))
|
||||
* coding-standard-baseline: Run baseline test on modified files only (fixes [#227](https://github.com/graycoreio/github-actions-magento2/issues/227)) ([#228](https://github.com/graycoreio/github-actions-magento2/issues/228)) ([e29ea44](https://github.com/graycoreio/github-actions-magento2/commit/e29ea44597d69cf743bc172fd84b8f9f238ff3b6))
|
||||
* continue to use elasticsearch instead of opensearch for now ([#224](https://github.com/graycoreio/github-actions-magento2/issues/224)) ([dd47d22](https://github.com/graycoreio/github-actions-magento2/commit/dd47d22478c7fae917f48261d9a32b0ca04aec3c))
|
||||
* **installation-test:** handle non-range composer versions ([c136c11](https://github.com/graycoreio/github-actions-magento2/commit/c136c111d923fa3c9d4f3fbeb38cd81d593168da))
|
||||
* **installation:** allow plugins in installation tests ([#14](https://github.com/graycoreio/github-actions-magento2/issues/14)) ([fcc0b85](https://github.com/graycoreio/github-actions-magento2/commit/fcc0b854448b5ca7de72000fce3f1f3a4266cd33))
|
||||
* **integration:** force to explicitly older monolog versions ([#12](https://github.com/graycoreio/github-actions-magento2/issues/12)) ([#16](https://github.com/graycoreio/github-actions-magento2/issues/16)) ([e9ea198](https://github.com/graycoreio/github-actions-magento2/commit/e9ea198bbe945bac89f80b600804b0d481c88917))
|
||||
* **integration:** only run monolog fixup on v2.4.4 ([#37](https://github.com/graycoreio/github-actions-magento2/issues/37)) ([841670a](https://github.com/graycoreio/github-actions-magento2/commit/841670a97fccd29d52b760bf0989ac5bb224ba3d))
|
||||
* make es8 run correctly in integration tests ([#66](https://github.com/graycoreio/github-actions-magento2/issues/66)) ([85d11af](https://github.com/graycoreio/github-actions-magento2/commit/85d11af76e15b6728c3cd1e4d8fb45289b2b1c8c))
|
||||
* pass correct repo url for nightly ([#158](https://github.com/graycoreio/github-actions-magento2/issues/158)) ([b645c23](https://github.com/graycoreio/github-actions-magento2/commit/b645c2327debb49615e1110064c35732aa1b59f4))
|
||||
* PHPcs baseline composer conflicts ([bf34ec4](https://github.com/graycoreio/github-actions-magento2/commit/bf34ec4964e683e47b442f82d1cdb0d74b01de69))
|
||||
* **supported-version:** falsiness of custom_versions ([c9b7f41](https://github.com/graycoreio/github-actions-magento2/commit/c9b7f41525923edd1fc40b635d776ad5c2ebf6ec))
|
||||
* **supported-version:** matrix innaccessible outside of repo ([#8](https://github.com/graycoreio/github-actions-magento2/issues/8)) ([56cff9d](https://github.com/graycoreio/github-actions-magento2/commit/56cff9de0b3bb16e4d921bca6a69ea28eae237e2))
|
||||
* **supported-version:** pin-back MySQL to breaking change for tests ([#46](https://github.com/graycoreio/github-actions-magento2/issues/46)) ([4b9366f](https://github.com/graycoreio/github-actions-magento2/commit/4b9366fdf2ec72215c0e76dcabfe5e5bfee689de))
|
||||
* **supported-versions:** GA Ubuntu-22.04 release ([#110](https://github.com/graycoreio/github-actions-magento2/issues/110)) ([b0e1a0a](https://github.com/graycoreio/github-actions-magento2/commit/b0e1a0a9439be892062a6f05161d83e7ae2c7cbf))
|
||||
* **supported-versions:** nightly build matrix tag ([#152](https://github.com/graycoreio/github-actions-magento2/issues/152)) ([7f1821f](https://github.com/graycoreio/github-actions-magento2/commit/7f1821f6ac3faff2e2384212f33fcfdcc8cf4573))
|
||||
* switch from tj-actions/changed-files to dorny/paths-filter ([87fe77f](https://github.com/graycoreio/github-actions-magento2/commit/87fe77f8a8dcf6828317894c4b849c4be041853f))
|
||||
* use exact version of elasticsearch since there is no 8.11 tag ([#225](https://github.com/graycoreio/github-actions-magento2/issues/225)) ([b4f27f1](https://github.com/graycoreio/github-actions-magento2/commit/b4f27f19e5196ba6be3b6007cd3e71a40471aa4f))
|
||||
|
||||
## [1.6.0](https://github.com/mage-os/github-actions/compare/v1.5.0...v1.6.0) (2025-03-07)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* run setup:di:compile on push ([#116](https://github.com/mage-os/github-actions/issues/116)) ([22aca78](https://github.com/mage-os/github-actions/commit/22aca78cc8c648549b7a139fd2739ac9e8db916d))
|
||||
|
||||
## [1.5.0](https://github.com/mage-os/github-actions/compare/v1.4.0...v1.5.0) (2024-12-30)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add magento releases 2.4.4-p9, 2.4.5-p8, 2.4.6-p6, and 2.4.7-p1 ([#226](https://github.com/mage-os/github-actions/issues/226)) ([a326271](https://github.com/mage-os/github-actions/commit/a3262710f1f605bf468b6fe70d5f1a5bd47b6bb4))
|
||||
* add new releases to the version matrix ([#232](https://github.com/mage-os/github-actions/issues/232)) ([b633b21](https://github.com/mage-os/github-actions/commit/b633b2120a2157aa13c3e7dd71b1cdbc0045e5d9))
|
||||
* add project versions ([#110](https://github.com/mage-os/github-actions/issues/110)) ([f7f0504](https://github.com/mage-os/github-actions/commit/f7f0504691b19689227b4db17d333bca62f80cc0))
|
||||
* add releases 2.4.4-p6, 2.4.5-p5 and 2.4.6-p3 ([#169](https://github.com/mage-os/github-actions/issues/169)) ([2086708](https://github.com/mage-os/github-actions/commit/2086708ffc708b7685b579027163340a4ddfa44f))
|
||||
* add support for v2.3.7 on new vms ([#67](https://github.com/mage-os/github-actions/issues/67)) ([2824849](https://github.com/mage-os/github-actions/commit/28248496e0979dff3cb255abbfff84cdebd5697b))
|
||||
* add upcoming release for mage-os 1.0.2 ([#223](https://github.com/mage-os/github-actions/issues/223)) ([f1b13e8](https://github.com/mage-os/github-actions/commit/f1b13e8984ec13e1a154e737c8494470f88b9a21))
|
||||
* add upcoming release Mage-OS 1.0.3 to supported-version matrix ([#229](https://github.com/mage-os/github-actions/issues/229)) ([6e50d0d](https://github.com/mage-os/github-actions/commit/6e50d0d8de09da49ce12473b2577a2277e4d701e))
|
||||
* **coding-standard:** add `ignore_warnings` flag ([#147](https://github.com/mage-os/github-actions/issues/147)) ([4e21b18](https://github.com/mage-os/github-actions/commit/4e21b18ee9187253fc5d172d0ad1439bf304872e))
|
||||
* **get-composer-version:** create new action ([#145](https://github.com/mage-os/github-actions/issues/145)) ([bc840e1](https://github.com/mage-os/github-actions/commit/bc840e13727b4273aa9c22e4116a05cde58b046d))
|
||||
* **semver-compare:** add new Github action ([#146](https://github.com/mage-os/github-actions/issues/146)) ([01e4ccb](https://github.com/mage-os/github-actions/commit/01e4ccbc54ebe8996c3f25d777a0b4fdc1288e13))
|
||||
* **supported-versions:** add release date ([#100](https://github.com/mage-os/github-actions/issues/100)) ([5599a0d](https://github.com/mage-os/github-actions/commit/5599a0d2e790952fbdfbbc23b9a1c92aa26eed35))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* add missing build for 1.4.0 of supported versions ([#64](https://github.com/mage-os/github-actions/issues/64)) ([e48a346](https://github.com/mage-os/github-actions/commit/e48a3463c5054012f748bb64eca2bab51220cdc0))
|
||||
* coding-standard-baseline: Run baseline test on modified files only (fixes [#227](https://github.com/mage-os/github-actions/issues/227)) ([#228](https://github.com/mage-os/github-actions/issues/228)) ([e29ea44](https://github.com/mage-os/github-actions/commit/e29ea44597d69cf743bc172fd84b8f9f238ff3b6))
|
||||
* continue to use elasticsearch instead of opensearch for now ([#224](https://github.com/mage-os/github-actions/issues/224)) ([dd47d22](https://github.com/mage-os/github-actions/commit/dd47d22478c7fae917f48261d9a32b0ca04aec3c))
|
||||
* make es8 run correctly in integration tests ([#66](https://github.com/mage-os/github-actions/issues/66)) ([85d11af](https://github.com/mage-os/github-actions/commit/85d11af76e15b6728c3cd1e4d8fb45289b2b1c8c))
|
||||
* pass correct repo url for nightly ([#158](https://github.com/mage-os/github-actions/issues/158)) ([b645c23](https://github.com/mage-os/github-actions/commit/b645c2327debb49615e1110064c35732aa1b59f4))
|
||||
* PHPcs baseline composer conflicts ([bf34ec4](https://github.com/mage-os/github-actions/commit/bf34ec4964e683e47b442f82d1cdb0d74b01de69))
|
||||
* **supported-versions:** nightly build matrix tag ([#152](https://github.com/mage-os/github-actions/issues/152)) ([7f1821f](https://github.com/mage-os/github-actions/commit/7f1821f6ac3faff2e2384212f33fcfdcc8cf4573))
|
||||
* switch from tj-actions/changed-files to dorny/paths-filter ([87fe77f](https://github.com/mage-os/github-actions/commit/87fe77f8a8dcf6828317894c4b849c4be041853f))
|
||||
* use exact version of elasticsearch since there is no 8.11 tag ([#225](https://github.com/mage-os/github-actions/issues/225)) ([b4f27f1](https://github.com/mage-os/github-actions/commit/b4f27f19e5196ba6be3b6007cd3e71a40471aa4f))
|
||||
|
||||
## [1.4.0](https://github.com/mage-os/github-actions/compare/v1.3.0...v1.4.0) (2023-06-20)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* make phpcs severity level configurable ([#130](https://github.com/mage-os/github-actions/issues/130)) ([81a1eb2](https://github.com/mage-os/github-actions/commit/81a1eb2273864842286a4427519c9d29146c5ac8))
|
||||
* **supported-version:** validate custom_versions ([5c19804](https://github.com/mage-os/github-actions/commit/5c198049f7002fff785d07f344f3773ce92e2c0f))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **supported-version:** falsiness of custom_versions ([c9b7f41](https://github.com/mage-os/github-actions/commit/c9b7f41525923edd1fc40b635d776ad5c2ebf6ec))
|
||||
|
||||
## [1.3.0](https://github.com/graycoreio/github-actions-magento2/compare/v1.2.0...v1.3.0) (2023-03-15)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add `cache-magento` action ([#87](https://github.com/graycoreio/github-actions-magento2/issues/87)) ([f5d43a5](https://github.com/graycoreio/github-actions-magento2/commit/f5d43a5184d20dc60b5e45d47b9d14300eb14754))
|
||||
* add `fix-magento` action ([#86](https://github.com/graycoreio/github-actions-magento2/issues/86)) ([856d2df](https://github.com/graycoreio/github-actions-magento2/commit/856d2df4819a5d0cdff6087a005ca966c7d409c0))
|
||||
* add rabbitmq images with management plugin ([#125](https://github.com/graycoreio/github-actions-magento2/issues/125)) ([0f31e40](https://github.com/graycoreio/github-actions-magento2/commit/0f31e401b775c085720176a4ac7626c45d2b07d0))
|
||||
* **get-magento-version:** add get-magento-version action ([#72](https://github.com/graycoreio/github-actions-magento2/issues/72)) ([fd858c3](https://github.com/graycoreio/github-actions-magento2/commit/fd858c30633e97bdc93cc8c2fe7adaef99a6bf7c))
|
||||
* **setup-magento:** add a new action to setup Magento ([#76](https://github.com/graycoreio/github-actions-magento2/issues/76)) ([7b74ff7](https://github.com/graycoreio/github-actions-magento2/commit/7b74ff738699d86aafed7690464302b1f07e59d0))
|
||||
* **supported-version:** dynamically compute ([#120](https://github.com/graycoreio/github-actions-magento2/issues/120)) ([dbc889f](https://github.com/graycoreio/github-actions-magento2/commit/dbc889f7cea548d319a5cd206269b007319d53ec))
|
||||
* **supported-version:** Magento v2.4.6 ([d3b1ab6](https://github.com/graycoreio/github-actions-magento2/commit/d3b1ab6b344b6a1ff705d2e57ad400ab506456be))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **installation-test:** handle non-range composer versions ([c136c11](https://github.com/graycoreio/github-actions-magento2/commit/c136c111d923fa3c9d4f3fbeb38cd81d593168da))
|
||||
* **supported-versions:** GA Ubuntu-22.04 release ([#110](https://github.com/graycoreio/github-actions-magento2/issues/110)) ([b0e1a0a](https://github.com/graycoreio/github-actions-magento2/commit/b0e1a0a9439be892062a6f05161d83e7ae2c7cbf))
|
||||
|
||||
## [1.2.0](https://github.com/graycoreio/github-actions-magento2/compare/v1.1.0...v1.2.0) (2022-10-11)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
* @Mage-OS/infrastructure
|
||||
+1
-1
@@ -35,7 +35,7 @@ This Code of Conduct applies both within project spaces and in public spaces whe
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project lead at [damien@graycore.io](mailto:damien@graycore.io). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project lead at [board@mage-os.org](mailto:board@mage-os.org). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
||||
|
||||
|
||||
+1
-1
@@ -220,4 +220,4 @@ A detailed explanation can be found in this [document][commit-message-format].
|
||||
[coc]: https://github.com/graycoreio/github-actions-magento2/code-of-conduct/blob/main/CODE_OF_CONDUCT.md
|
||||
[commit-message-format]: https://www.conventionalcommits.org/en/v1.0.0/
|
||||
[github]: https://github.com/graycoreio/github-actions-magento2
|
||||
[discussions]: https://github.com/graycoreio/github-actions-magento2/discussions
|
||||
[discussions]: https://github.com/graycoreio/github-actions-magento2/discussions
|
||||
|
||||
@@ -11,20 +11,26 @@
|
||||
|
||||
Opinionated Github Actions and Workflows to make building, testing, and maintaining Magento 2 Modules easier.
|
||||
|
||||
* [README if you are new to Github Actions.](https://docs.github.com/en/actions/learn-github-actions/understanding-github-actions#the-components-of-github-actions)
|
||||
* [What is a workflow?](https://docs.github.com/en/actions/learn-github-actions/understanding-github-actions#workflows)
|
||||
* [What is an action?](https://docs.github.com/en/actions/learn-github-actions/understanding-github-actions#actions)
|
||||
- [README if you are new to Github Actions.](https://docs.github.com/en/actions/learn-github-actions/understanding-github-actions#the-components-of-github-actions)
|
||||
- [What is a workflow?](https://docs.github.com/en/actions/learn-github-actions/understanding-github-actions#workflows)
|
||||
- [What is an action?](https://docs.github.com/en/actions/learn-github-actions/understanding-github-actions#actions)
|
||||
|
||||
## Workflows
|
||||
|
||||
| Workflow Name | Description |
|
||||
| -------------------------------------------------------- | ---------------------------------------------------------------------- |
|
||||
| [Integration Test](./.github/workflows/integration-README.md) | A Github Workflow that runs the Integration Tests of a Magento Package |
|
||||
| Workflow Name | Description |
|
||||
| -------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
|
||||
| [Integration Test](./.github/workflows/integration-README.md) | A Github Workflow that runs the Integration Tests of a Magento Package |
|
||||
| [MageCheck Extension](./.github/workflows/check-extension-README.md) | A Github Workflow that runs various kinds of quality checks for a Magento Extension. |
|
||||
|
||||
## Actions
|
||||
|
||||
| Action Name | Description |
|
||||
| ------------------------------------------------ | ------------------------------------------------------------------ |
|
||||
| [Unit Test](./unit-test/README.md) | A Github Action that runs the Unit Tests a Magento Package |
|
||||
| [Installation Test](installation-test/README.md) | A Github Action that tests the installability of a Magento Package |
|
||||
| [Supported Version](supported-version/README.md) | A Github Action that computes the currently supported Github Actions Matrix for Magento 2 |
|
||||
| Action Name | Description |
|
||||
| ------------------------------------------------------ | ----------------------------------------------------------------------------------------- |
|
||||
| [Unit Test](./unit-test/README.md) | A Github Action that runs the Unit Tests a Magento Package |
|
||||
| [Fix Magento Install](./fix-magento-install/README.md) | A Github Action that fixes Magento before `composer install` |
|
||||
| [Cache Magento](./cache-magento/README.md) | A Github Action that creates a composer cache for a Magento extension or store. |
|
||||
| [Setup Magento](./setup-magento/README.md) | A Github Action that sets up Magento before `composer install` for an extension or store. |
|
||||
| [Get Magento Version](./get-magento-version/README.md) | A Github Action that computes the installed Magento version. |
|
||||
| [Installation Test](./installation-test/README.md) | A Github Action that tests the installability of a Magento Package |
|
||||
| [Semver Compare](./semver-compare/README.md) | A Github Action that semantically compares two versions |
|
||||
| [Supported Version](./supported-version/README.md) | A Github Action that computes the currently supported Github Actions Matrix for Magento 2 |
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
vendor/
|
||||
.phpunit.result.cache
|
||||
.phpunit.result.cache
|
||||
composer.lock
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "graycore/magento2-demo-package",
|
||||
"name": "mage-os/magento2-demo-package",
|
||||
"description": "A Magento 2 Demostration Package",
|
||||
"type": "magento2-module",
|
||||
"license": "MIT",
|
||||
@@ -45,6 +45,6 @@
|
||||
}
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^9.5"
|
||||
"phpunit/phpunit": "^9.5 || ^10 || ^11 || ^12"
|
||||
}
|
||||
}
|
||||
|
||||
Generated
-6001
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,41 @@
|
||||
# Cache Magento Action
|
||||
|
||||
A Github Action that creates a composer cache for a Magento extension or store.
|
||||
|
||||
## Inputs
|
||||
|
||||
|
||||
See the [action.yml](./action.yml)
|
||||
|
||||
| Input | Description | Required | Default |
|
||||
| ------------------ | -------------------------------------------------------------------------------------- | -------- | ------------ |
|
||||
| composer_cache_key | A key to version the composer cache. Can be incremented if you need to bust the cache. | false | '__mageos' |
|
||||
| mode | "The mode for setup, one of: `extension` or `store`." | true | N/A |
|
||||
|
||||
### Usage
|
||||
|
||||
```yml
|
||||
name: Magento Cache
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
showcase_cache:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: graycoreio/github-actions-magento2/cache-magento@main
|
||||
with:
|
||||
mode: 'store'
|
||||
id: cache-magento
|
||||
|
||||
- run: composer install
|
||||
shell: bash
|
||||
name: Composer install
|
||||
```
|
||||
@@ -0,0 +1,47 @@
|
||||
name: "Cache Magento 2 for Pipeline"
|
||||
author: "Graycore"
|
||||
description: "A Github Action that creates a composer cache for a Magento extension or store."
|
||||
|
||||
inputs:
|
||||
composer_cache_key:
|
||||
required: false
|
||||
default: "__mageos"
|
||||
description: A key to version the composer cache. Can be incremented if you need to bust the cache.
|
||||
|
||||
mode:
|
||||
required: true
|
||||
description: "The mode for setup, one of: `extension` or `store`."
|
||||
|
||||
outputs:
|
||||
cache-hit:
|
||||
description: "A boolean value to indicate an exact match was found for the key"
|
||||
value: ${{ steps.cache-magento-cache.outputs.cache-hit }}
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Get Composer Cache Directory
|
||||
shell: bash
|
||||
id: cache-magento-composer-cache
|
||||
run: |
|
||||
echo "dir=$(composer config cache-files-dir --global)" >> $GITHUB_OUTPUT
|
||||
|
||||
- run: echo "::set-output name=version::$(php -v | awk 'NR==1{print $2}')"
|
||||
shell: bash
|
||||
id: cache-magento-get-php-version
|
||||
|
||||
- run: echo "::set-output name=version::$(composer --version | awk '{print $3}')"
|
||||
shell: bash
|
||||
name: Compute Composer Version
|
||||
id: cache-magento-get-composer-version
|
||||
|
||||
- name: "Cache Composer Packages"
|
||||
uses: actions/cache@v5
|
||||
id: cache-magento-cache
|
||||
with:
|
||||
key: "composer | v5.8 | ${{ inputs.composer_cache_key }} | ${{ steps.cache-magento-get-composer-version.outputs.version }} | ${{ steps.cache-magento-get-php-version.outputs.version }}"
|
||||
path: ${{ steps.cache-magento-composer-cache.outputs.dir }}
|
||||
|
||||
branding:
|
||||
icon: "code"
|
||||
color: "green"
|
||||
Executable
+45
@@ -0,0 +1,45 @@
|
||||
# Magento 2 Coding Standard Action
|
||||
|
||||
This Github Action automates the enforcement of Magento Coding Standards. It ensures code consistency and quality by checking code against Magento's specific coding guidelines.
|
||||
|
||||
## Inputs
|
||||
|
||||
For detailed descriptions of each input, refer to [action.yml](./action.yml).
|
||||
|
||||
## Why a Baseline?
|
||||
|
||||
Running PHP CodeSniffer (PHPCS) with a baseline is crucial for managing legacy code. It allows you to set a "starting point" for code quality, ignoring existing issues while ensuring no new issues are introduced. This approach is especially useful for large codebases where addressing all existing issues at once is not feasible. The baseline serves as a record of known issues, enabling teams to focus on maintaining and gradually improving code quality in new or modified code.
|
||||
|
||||
## Usage Example
|
||||
|
||||
The following example demonstrates how to set up the action in your workflow:
|
||||
|
||||
Check how this action is used in mage-os [here](https://github.com/mage-os/mageos-magento2/blob/2.4-develop/.github/workflows/coding-standard-baseline.yml).
|
||||
|
||||
```yml
|
||||
name: Coding Standard Baseline
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
coding-standard:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: graycoreio/github-actions-magento2/coding-standard-baseline@main
|
||||
with:
|
||||
head_repo: "mage-os/mageos-magento2"
|
||||
head_ref: "main"
|
||||
php_version: "8.2"
|
||||
composer_version: "2"
|
||||
version: "*"
|
||||
severity: "5"
|
||||
warning_severity: "8"
|
||||
error_severity: "8"
|
||||
baseline_version: "*"
|
||||
```
|
||||
Executable
+151
@@ -0,0 +1,151 @@
|
||||
name: "M2 Coding Standard"
|
||||
author: "Mage-OS"
|
||||
description: "A Github Action that runs the Magento Coding Standard."
|
||||
|
||||
inputs:
|
||||
php_version:
|
||||
type: string
|
||||
required: true
|
||||
default: "8.2"
|
||||
description: "PHP version used to do the coding standard check (default: 8.2)."
|
||||
|
||||
composer_version:
|
||||
type: string
|
||||
required: true
|
||||
default: "2"
|
||||
description: "The version of composer to use (default: 2)."
|
||||
|
||||
version:
|
||||
type: string
|
||||
required: false
|
||||
default: "*"
|
||||
description: "The version of the coding standard to use (default: latest)."
|
||||
|
||||
severity:
|
||||
type: string
|
||||
required: false
|
||||
default: "5"
|
||||
description: "The minimum severity required to display an error or warning (default: 5)"
|
||||
|
||||
warning_severity:
|
||||
type: string
|
||||
required: false
|
||||
default: "8"
|
||||
description: "The minimum severity required to display a warning (default: 8)."
|
||||
|
||||
error_severity:
|
||||
type: string
|
||||
required: false
|
||||
default: "8"
|
||||
description: "The minimum severity required to display an error (default: 8)."
|
||||
|
||||
baseline_version:
|
||||
type: string
|
||||
required: false
|
||||
default: "*"
|
||||
description: "The version of phpcs baseline to use (default: latest)."
|
||||
|
||||
head_repo:
|
||||
type: string
|
||||
required: true
|
||||
description: "The repository full name of the head branch. E.g.: mage-os/mageos-magento2"
|
||||
|
||||
head_ref:
|
||||
type: string
|
||||
required: true
|
||||
description: "The branch name of the head branch. E.g.: main"
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Checkout head
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
ref: ${{ inputs.head_ref }}
|
||||
repository: ${{ inputs.head_repo }}
|
||||
|
||||
- uses: dorny/paths-filter@v2
|
||||
name: Filter changed files
|
||||
id: filter
|
||||
with:
|
||||
list-files: shell
|
||||
filters: |
|
||||
baseline:
|
||||
- modified: '**/**.{php,phtml,graphqls,less,css,html,xml,js}'
|
||||
phpcs:
|
||||
- added|modified: '**/**.{php,phtml,graphqls,less,css,html,xml,js}'
|
||||
|
||||
- name: Check changed files for PHPcs
|
||||
if: steps.filter.outputs.phpcs == 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
echo "One or more files relevant to PHPCS have changed."
|
||||
echo "List all the files that have been added or changed: ${{ steps.filter.outputs.phpcs_files }}"
|
||||
|
||||
- name: Setup PHP
|
||||
if: steps.filter.outputs.phpcs == 'true'
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ inputs.php_version }}
|
||||
tools: composer:v${{ inputs.composer_version }}
|
||||
coverage: none
|
||||
|
||||
- name: Install coding standards
|
||||
if: steps.filter.outputs.phpcs == 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
composer create-project --no-plugins --no-dev \
|
||||
magento/magento-coding-standard \
|
||||
magento-coding-standard "${{ github.event.inputs.version || '*' }}"
|
||||
|
||||
- name: Install phpcs baseline
|
||||
if: steps.filter.outputs.phpcs == 'true'
|
||||
working-directory: magento-coding-standard
|
||||
shell: bash
|
||||
run: |
|
||||
composer config --no-plugins allow-plugins.digitalrevolution/php-codesniffer-baseline true
|
||||
composer require --dev "digitalrevolution/php-codesniffer-baseline: ${{ github.event.inputs.baseline_version || '*' }}"
|
||||
|
||||
- name: Checkout base
|
||||
if: steps.filter.outputs.phpcs == 'true'
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
ref: ${{github.event.pull_request.base.ref}}
|
||||
repository: ${{github.event.pull_request.base.repo.full_name}}
|
||||
path: base
|
||||
|
||||
- name: Create phpcs.baseline.xml from base
|
||||
shell: bash
|
||||
working-directory: base
|
||||
if: steps.filter.outputs.baseline == 'true'
|
||||
run: |
|
||||
php ${{ github.workspace }}/magento-coding-standard/vendor/bin/phpcs --standard=Magento2 \
|
||||
$([ -n "${{ inputs.severity }}" ] && echo "--severity=${{ inputs.severity }}") \
|
||||
$([ -n "${{ inputs.warning_severity }}" ] && echo "--warning-severity=${{ inputs.warning_severity }}") \
|
||||
$([ -n "${{ inputs.error_severity }}" ] && echo "--error-severity=${{ inputs.error_severity }}") \
|
||||
--report=\\DR\\CodeSnifferBaseline\\Reports\\Baseline --report-file=phpcs.baseline.xml \
|
||||
${{ steps.filter.outputs.baseline_files }} || /bin/true
|
||||
|
||||
- name: Copy baseline to head
|
||||
if: steps.filter.outputs.baseline == 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
cp ${{ github.workspace }}/base/phpcs.baseline.xml ${{ github.workspace }}/magento-coding-standard/phpcs.baseline.xml
|
||||
|
||||
# Since we ran phpcs in the base folder, the files in phpcs.baseline.xml contain the base folder in the path.
|
||||
# We need to remove /base/ so that the phpcs can locate the correct files.
|
||||
- name: Remove base dir from phpcs baseline
|
||||
if: steps.filter.outputs.baseline == 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
sed -i "s|/base/|/|" ${{ github.workspace }}/magento-coding-standard/phpcs.baseline.xml
|
||||
|
||||
- name: Execute phpcs on head for changed files
|
||||
shell: bash
|
||||
if: steps.filter.outputs.phpcs == 'true'
|
||||
run: |
|
||||
php ${{ github.workspace }}/magento-coding-standard/vendor/bin/phpcs --standard=Magento2 \
|
||||
$([ -n "${{ inputs.severity }}" ] && echo "--severity=${{ inputs.severity }}") \
|
||||
$([ -n "${{ inputs.warning_severity }}" ] && echo "--warning-severity=${{ inputs.warning_severity }}") \
|
||||
$([ -n "${{ inputs.error_severity }}" ] && echo "--error-severity=${{ inputs.error_severity }}") \
|
||||
${{ steps.filter.outputs.phpcs_files }}
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
A Github Action that runs the Magento Coding Standard.
|
||||
|
||||
> [!WARNING]
|
||||
> This action is only compatible with Magento v2.4.4+.
|
||||
|
||||
## Inputs
|
||||
|
||||
See the [action.yml](./action.yml)
|
||||
@@ -27,4 +30,7 @@ jobs:
|
||||
with:
|
||||
version: 25 # Optional, will use the latest if omitted.
|
||||
path: app/code # Optional, will be used when event is not a pull request.
|
||||
severity: 8 # Optional, will use phpcs default of 5 if not specified.
|
||||
warning_severity: 4 # Optional, will use severity value if not specified.
|
||||
error_severity: 7 # Optional, will use severity value if not specified.
|
||||
```
|
||||
|
||||
@@ -21,12 +21,32 @@ inputs:
|
||||
version:
|
||||
required: false
|
||||
description: "The version of the coding standard to use. If not provided, will use the latest version."
|
||||
|
||||
severity:
|
||||
required: false
|
||||
default: ""
|
||||
description: "The minimum severity required to display an error or warning (default: 5)"
|
||||
|
||||
warning_severity:
|
||||
required: false
|
||||
default: ""
|
||||
description: "The minimum severity required to display a warning"
|
||||
|
||||
error_severity:
|
||||
required: false
|
||||
default: ""
|
||||
description: "The minimum severity required to display an error"
|
||||
|
||||
ignore_warnings:
|
||||
description: 'Whether or not the action should fail on warnings, defaults to false (fails on warnings)'
|
||||
default: 'false'
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Checkout Project
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
path: project
|
||||
@@ -42,6 +62,23 @@ runs:
|
||||
tools: composer:v${{ inputs.composer_version }}
|
||||
coverage: none
|
||||
|
||||
- name: Get Composer Version
|
||||
uses: graycoreio/github-actions-magento2/get-composer-version@main
|
||||
id: get-composer-version
|
||||
|
||||
- name: Check if allow-plugins option is available for this version of composer
|
||||
uses: graycoreio/github-actions-magento2/semver-compare@main
|
||||
with:
|
||||
version: 2.2
|
||||
compare_against: ${{ steps.get-composer-version.outputs.version }}
|
||||
id: is-allow-plugins-available
|
||||
|
||||
- name: Enable dealerdirect/phpcodesniffer-composer-installer plugin
|
||||
shell: bash
|
||||
working-directory: standard
|
||||
run: composer config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true --global
|
||||
if: steps.is-allow-plugins-available.outputs.result < 1
|
||||
|
||||
- name: Install Coding Standard
|
||||
shell: bash
|
||||
working-directory: standard
|
||||
@@ -50,16 +87,27 @@ runs:
|
||||
- name: Register Coding Standard
|
||||
shell: bash
|
||||
working-directory: standard
|
||||
run: vendor/bin/phpcs --config-set installed_paths ${{ github.workspace }}/standard/vendor/magento/magento-coding-standard,${{ github.workspace }}/standard/vendor/phpcompatibility/php-compatibility
|
||||
run: vendor/bin/phpcs --config-set installed_paths ${{ github.workspace }}/standard/vendor/magento/magento-coding-standard,${{ github.workspace }}/standard/vendor/magento/php-compatibility-fork
|
||||
|
||||
- name: Set ignore warnings flag
|
||||
shell: bash
|
||||
working-directory: standard
|
||||
run: vendor/bin/phpcs --config-set ignore_warnings_on_exit 1
|
||||
if: inputs.ignore_warnings == 'true'
|
||||
|
||||
- name: Get Changed Files
|
||||
shell: bash
|
||||
working-directory: project
|
||||
id: changed-files
|
||||
run: echo "::set-output name=files::$(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | xargs)"
|
||||
run: echo "files=$(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | xargs)" >> $GITHUB_OUTPUT
|
||||
if: github.event_name == 'pull_request'
|
||||
|
||||
- name: Coding Standard Check
|
||||
shell: bash
|
||||
run: ../standard/vendor/bin/phpcs --standard=Magento2 ${{ github.event_name == 'pull_request' && steps.changed-files.outputs.files || inputs.path }}
|
||||
run: |
|
||||
../standard/vendor/bin/phpcs --standard=Magento2 \
|
||||
$([ -n "${{ inputs.severity }}" ] && echo "--severity=${{ inputs.severity }}") \
|
||||
$([ -n "${{ inputs.warning_severity }}" ] && echo "--warning-severity=${{ inputs.warning_severity }}") \
|
||||
$([ -n "${{ inputs.error_severity }}" ] && echo "--error-severity=${{ inputs.error_severity }}") \
|
||||
${{ github.event_name == 'pull_request' && steps.changed-files.outputs.files || inputs.path }}
|
||||
working-directory: project
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# Fix Magento
|
||||
|
||||
A Github Action that fixes Magento before `composer install`.
|
||||
|
||||
> You probably only need this action if you're working on a Magento extension. However, if you're working on a Magento store and your CI pipeline breaks, this is probably a good first place to look for corrective measures to take.
|
||||
|
||||
## Inputs
|
||||
|
||||
See the [action.yml](./action.yml)
|
||||
|
||||
## Usage
|
||||
|
||||
```yml
|
||||
name: Fix Magento Install
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
fix:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: graycoreio/github-actions-magento2/fix-magento-install@main
|
||||
with:
|
||||
magento_directory: path/to/magento
|
||||
```
|
||||
@@ -0,0 +1,48 @@
|
||||
name: "Fix Magento Install"
|
||||
author: "Graycore"
|
||||
description: "A Github Action that fixes Magento before `composer install`"
|
||||
inputs:
|
||||
magento_directory:
|
||||
required: true
|
||||
description: "The folder where Magento is installed"
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- uses: graycoreio/github-actions-magento2/get-magento-version@main
|
||||
id: init-magento-get-magento-version
|
||||
with:
|
||||
working-directory: ${{ inputs.magento_directory }}
|
||||
|
||||
- run: echo "::set-output name=version::$(composer --version | awk '{print $3}')"
|
||||
shell: bash
|
||||
name: Compute Composer Version
|
||||
id: init-magento-get-composer-version
|
||||
|
||||
- run: composer require monolog/monolog:"<2.7.0" --no-update
|
||||
shell: bash
|
||||
name: Fixup Monolog (https://github.com/magento/magento2/pull/35596)
|
||||
working-directory: ${{ inputs.magento_directory }}
|
||||
if: |
|
||||
steps.init-magento-get-magento-version.outputs.version == '"2.4.4"'
|
||||
|
||||
- run: composer require "dotmailer/dotmailer-magento2-extension-package:4.6.0-p2 as 4.6.0" --no-update
|
||||
shell: bash
|
||||
name: Fixup Dotmailer (https://devdocs.magento.com/guides/v2.4/release-notes/release-notes-2-4-0-commerce.html#dotdigital-1)
|
||||
working-directory: ${{ inputs.magento_directory }}
|
||||
if: |
|
||||
steps.init-magento-get-magento-version.outputs.version == '"2.4.0"'
|
||||
|
||||
- run: |
|
||||
composer config --no-interaction allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
|
||||
composer config --no-interaction allow-plugins.laminas/laminas-dependency-plugin true
|
||||
composer config --no-interaction allow-plugins.magento/* true
|
||||
name: Fixup Composer Plugins
|
||||
shell: bash
|
||||
working-directory: ${{ inputs.magento_directory }}
|
||||
if: |
|
||||
!startsWith(steps.init-magento-get-composer-version.outputs.version, 1)
|
||||
|
||||
branding:
|
||||
icon: "code"
|
||||
color: "green"
|
||||
@@ -0,0 +1,32 @@
|
||||
# "Get Composer Version" Action
|
||||
|
||||
A Github Action that computes an installed Composer version.
|
||||
|
||||
## Inputs
|
||||
|
||||
See the [action.yml](./action.yml)
|
||||
|
||||
## Usage
|
||||
|
||||
```yml
|
||||
name: Get Composer Version
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
version:
|
||||
runs-on: ubuntu-latest
|
||||
name: A job to compute an installed Composer version.
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: graycoreio/github-actions-magento2/get-composer-version@main
|
||||
id: get-composer-version
|
||||
- run: echo version ${{ steps.get-composer-version.outputs.version }}
|
||||
shell: bash
|
||||
```
|
||||
@@ -0,0 +1,20 @@
|
||||
name: "Get Composer Version"
|
||||
author: "Graycore"
|
||||
description: " A Github Action that determines the currently installed version of Composer"
|
||||
|
||||
outputs:
|
||||
version: # id of output
|
||||
description: 'The determined version of Composer'
|
||||
value: ${{ steps.get-composer-version.outputs.version }}
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- run: echo "version=$(composer --version | awk '{print $3}')" >> $GITHUB_OUTPUT
|
||||
shell: bash
|
||||
name: Compute Installed Composer version
|
||||
id: get-composer-version
|
||||
|
||||
branding:
|
||||
icon: "code"
|
||||
color: "green"
|
||||
@@ -0,0 +1,32 @@
|
||||
# "Get Magento Version" Action
|
||||
|
||||
A Github Action that computes an installed Magento version.
|
||||
|
||||
## Inputs
|
||||
|
||||
See the [action.yml](./action.yml)
|
||||
|
||||
## Usage
|
||||
|
||||
```yml
|
||||
name: Get Magento Version
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
version:
|
||||
runs-on: ubuntu-latest
|
||||
name: A job to compute an installed Magento version.
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: graycoreio/github-actions-magento2/get-magento-version@main
|
||||
id: get-magento-version
|
||||
- run: echo version ${{ steps.get-magento-version.outputs.version }}
|
||||
shell: bash
|
||||
```
|
||||
@@ -0,0 +1,31 @@
|
||||
name: "Get Magento Version"
|
||||
author: "Graycore"
|
||||
description: " A Github Action that determines the currently installed version of Magento"
|
||||
|
||||
inputs:
|
||||
working-directory:
|
||||
default: $GITHUB_WORKSPACE
|
||||
description: "The current working directory of the action"
|
||||
required: false
|
||||
|
||||
outputs:
|
||||
version: # id of output
|
||||
description: 'The determined version of Magento'
|
||||
value: ${{ steps.get-magento-version.outputs.version }}
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- run: |
|
||||
echo "version=$(cat composer.json | jq '.require
|
||||
| with_entries( select(.key == "magento/product-community-edition" or .key == "magento/product-enterprise-edition") )
|
||||
| to_entries
|
||||
| .[0].value')" >> $GITHUB_OUTPUT
|
||||
shell: bash
|
||||
working-directory: ${{ inputs.working-directory }}
|
||||
name: Compute Installed Magento version
|
||||
id: get-magento-version
|
||||
|
||||
branding:
|
||||
icon: "code"
|
||||
color: "green"
|
||||
@@ -25,7 +25,7 @@ jobs:
|
||||
outputs:
|
||||
matrix: ${{ steps.supported-version.outputs.matrix }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v6
|
||||
- uses: graycoreio/github-actions-magento2/supported-version@main
|
||||
id: supported-version
|
||||
- run: echo ${{ steps.supported-version.outputs.matrix }}
|
||||
@@ -36,7 +36,7 @@ jobs:
|
||||
matrix: ${{ fromJSON(needs.compute_matrix.outputs.matrix) }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v6
|
||||
- uses: graycoreio/github-actions-magento2/installation-test@main
|
||||
with:
|
||||
composer_version: ${{ matrix.composer }}
|
||||
|
||||
@@ -64,8 +64,14 @@ runs:
|
||||
with:
|
||||
php-version: ${{ inputs.php_version }}
|
||||
|
||||
- run: composer self-update --${{ inputs.composer_version }}
|
||||
- run: composer self-update ${{ inputs.composer_version }}
|
||||
name: Pin to Composer Version ${{ inputs.composer_version }}
|
||||
if: contains(inputs.composer_version, '.') == true
|
||||
shell: bash
|
||||
|
||||
- run: composer self-update --${{ inputs.composer_version }}
|
||||
name: Pin to Composer Version ${{ inputs.composer_version }} (Range)
|
||||
if: contains(inputs.composer_version, '.') == false
|
||||
shell: bash
|
||||
|
||||
- run: composer create-project --repository-url="${{ inputs.magento_repository }}" "${{ inputs.magento_version }}" ${{ inputs.magento_directory }} --no-install
|
||||
@@ -79,10 +85,11 @@ runs:
|
||||
working-directory: ${{ inputs.magento_directory }}
|
||||
id: composer-cache
|
||||
run: |
|
||||
echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||
|
||||
|
||||
- name: "Cache Composer Packages"
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
key: "composer | v5 | ${{ inputs.composer_cache_key }} | ${{ hashFiles('composer.lock') }} | ${{ runner.os }} | ${{ inputs.composer_version }} | ${{ inputs.php_version }} | ${{ inputs.magento_version }}"
|
||||
path: ${{ steps.composer-cache.outputs.dir }}
|
||||
|
||||
Generated
+3155
-7190
File diff suppressed because it is too large
Load Diff
+12
-10
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@graycore/github-actions-magento",
|
||||
"version": "1.2.0",
|
||||
"name": "@graycoreio/github-actions-magento2",
|
||||
"version": "6.0.0",
|
||||
"description": "Github Actions for Magento 2",
|
||||
"scripts": {
|
||||
"test": "cd supported-version && npm run test && cd -",
|
||||
@@ -18,15 +18,17 @@
|
||||
},
|
||||
"homepage": "https://github.com/graycoreio/github-actions-magento2#readme",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.10.0"
|
||||
"@actions/core": "^1.11.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^28.1.7",
|
||||
"@types/node": "^18.8.3",
|
||||
"esbuild": "^0.15.10",
|
||||
"jest": "^28.1.3",
|
||||
"standard-version": "^9.5.0",
|
||||
"ts-jest": "^28.0.8",
|
||||
"typescript": "^4.8.4"
|
||||
"@types/jest": "^29.5.14",
|
||||
"@types/node": "^24.10.4",
|
||||
"@typescript-eslint/eslint-plugin": "^8.49.0",
|
||||
"@typescript-eslint/parser": "^8.49.0",
|
||||
"esbuild": "^0.25.12",
|
||||
"eslint": "^9.39.2",
|
||||
"jest": "^29.5.0",
|
||||
"ts-jest": "^29.4.6",
|
||||
"typescript": "^5.9.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"bump-minor-pre-major": true,
|
||||
"bump-patch-for-minor-pre-major": true,
|
||||
"draft-pull-request": true,
|
||||
"prerelease": true,
|
||||
"include-component-in-tag": false,
|
||||
"include-v-in-tag": true,
|
||||
"pull-request-title-pattern": "chore: release ${version}",
|
||||
"packages": {
|
||||
".": {
|
||||
"release-type": "node"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
# "Semver Compare" Action
|
||||
|
||||
A Github Action that semantically compares two versions, like 2.1.1 and 2.3.0 giving information about whether or the version is "higher" or "lower" than another version. The action exposes an output called `result` which will match the return type of the PHP [version_compare](https://www.php.net/manual/en/function.version-compare.php) function.
|
||||
|
||||
Currently, this action compares `version` against `compare_against` and returns:
|
||||
|
||||
- `-1` - if `version` is lower than `compare_against`
|
||||
- `0` - if `version` is equal to `compare_against`
|
||||
- `1` - if `version` is greater than `compare_against`
|
||||
|
||||
## Inputs
|
||||
|
||||
See the [action.yml](./action.yml)
|
||||
|
||||
## Usage
|
||||
|
||||
```yml
|
||||
name: Semver Compare
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
version:
|
||||
runs-on: ubuntu-latest
|
||||
name: A job to semantically compare two versions
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: graycoreio/github-actions-magento2/semver-compare@main
|
||||
with:
|
||||
version: 2.1.0
|
||||
compare_against: 2.2.3
|
||||
id: semver-compare
|
||||
- run: echo version ${{ steps.semver-compare.outputs.result }}
|
||||
shell: bash
|
||||
```
|
||||
@@ -0,0 +1,29 @@
|
||||
name: "Semver Compare"
|
||||
author: "Graycore"
|
||||
description: "A Github Action that compares two versions, semantically"
|
||||
|
||||
inputs:
|
||||
version:
|
||||
required: true
|
||||
description: "Original version"
|
||||
|
||||
compare_against:
|
||||
required: true
|
||||
description: "The version to compare against"
|
||||
|
||||
outputs:
|
||||
result: # id of output
|
||||
description: "The result of comparison. By default, this returns -1 if the first version is lower than the second, 0 if they are equal, and 1 if the second is lower."
|
||||
value: ${{ steps.semver-compare.outputs.result }}
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Semantically compare two versions
|
||||
run: php -r "echo 'result=' . version_compare('${{ inputs.version }}', '${{ inputs.compare_against }}');" >> $GITHUB_OUTPUT
|
||||
shell: bash
|
||||
id: semver-compare
|
||||
|
||||
branding:
|
||||
icon: "code"
|
||||
color: "green"
|
||||
@@ -0,0 +1,110 @@
|
||||
# Setup Magento
|
||||
|
||||
A GitHub Action that prepares a Magento 2 environment for testing. It handles PHP setup and Magento project creation, stopping just before `composer install` so you can add custom repositories or packages.
|
||||
|
||||
## Modes
|
||||
|
||||
The action operates in two modes:
|
||||
|
||||
- **`extension`** (default): Creates a fresh Magento project in `../magento2` for testing your extension against. Use this when your repository contains a Magento module/extension.
|
||||
- **`store`**: Uses your existing Magento project in the working directory. Use this when your repository is a full Magento store.
|
||||
|
||||
## Inputs
|
||||
|
||||
| Input | Required | Default | Description |
|
||||
|-------|----------|---------|-------------|
|
||||
| `php-version` | Yes | `8.4` | PHP version to install |
|
||||
| `mode` | Yes | `extension` | Either `extension` or `store` |
|
||||
| `magento_version` | No | `magento/project-community-edition:2.4.8-p3` | Magento version to install (extension mode only) |
|
||||
| `magento_repository` | No | `https://mirror.mage-os.org/` | Composer repository URL for Magento packages |
|
||||
| `tools` | No | - | PHP tools to install globally (e.g., `composer:v2`) |
|
||||
| `extensions` | No | - | Additional PHP extensions to install |
|
||||
| `coverage` | No | - | Code coverage driver (e.g., `xdebug`, `pcov`) |
|
||||
| `working-directory` | No | `.` | Working directory for the action |
|
||||
| `apply_fixes` | No | `false` | Apply Magento installation fixes (always applied in extension mode) |
|
||||
| `composer_auth` | No | - | Composer authentication credentials JSON |
|
||||
|
||||
## Outputs
|
||||
|
||||
| Output | Description |
|
||||
|--------|-------------|
|
||||
| `path` | Absolute path to the Magento installation directory |
|
||||
|
||||
## Usage
|
||||
|
||||
### Testing an Extension
|
||||
|
||||
Use `mode: extension` when your repository contains a Magento module. The action creates a fresh Magento instance and you can then require your extension into it.
|
||||
|
||||
```yml
|
||||
name: Test Extension
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- uses: graycoreio/github-actions-magento/setup-magento@main
|
||||
id: setup-magento
|
||||
with:
|
||||
php-version: "8.3"
|
||||
tools: composer:v2
|
||||
mode: extension
|
||||
magento_version: "magento/project-community-edition:2.4.8-p3"
|
||||
|
||||
- name: Add local repository
|
||||
working-directory: ${{ steps.setup-magento.outputs.path }}
|
||||
run: composer config repositories.local path $GITHUB_WORKSPACE
|
||||
|
||||
- name: Require extension
|
||||
working-directory: ${{ steps.setup-magento.outputs.path }}
|
||||
run: composer require vendor/my-extension "@dev"
|
||||
env:
|
||||
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
|
||||
```
|
||||
|
||||
### Testing a Magento Store
|
||||
|
||||
Use `mode: store` when your repository is a complete Magento project.
|
||||
|
||||
```yml
|
||||
name: Test Store
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- uses: graycoreio/github-actions-magento/setup-magento@main
|
||||
id: setup-magento
|
||||
with:
|
||||
php-version: "8.3"
|
||||
tools: composer:v2
|
||||
mode: store
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: ${{ steps.setup-magento.outputs.path }}
|
||||
run: composer install
|
||||
env:
|
||||
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
- The action uses [shivammathur/setup-php](https://github.com/shivammathur/setup-php) for PHP installation
|
||||
- By default, Magento packages are fetched from the [Mage-OS mirror](https://mirror.mage-os.org/) which doesn't require authentication
|
||||
- For Adobe Commerce or private packages, provide `composer_auth` with your credentials
|
||||
@@ -0,0 +1,106 @@
|
||||
name: "Setup Magento"
|
||||
author: "Graycore"
|
||||
description: "This action sets up a Magento instance for further actions like running tests, etc."
|
||||
|
||||
inputs:
|
||||
php-version:
|
||||
description: "Setup PHP version."
|
||||
default: "8.4"
|
||||
required: true
|
||||
|
||||
tools:
|
||||
description: "Setup popular tools globally."
|
||||
required: false
|
||||
|
||||
extensions:
|
||||
description: "Setup PHP extensions."
|
||||
required: false
|
||||
|
||||
coverage:
|
||||
description: "Setup code coverage driver."
|
||||
required: false
|
||||
|
||||
magento_repository:
|
||||
required: false
|
||||
default: "https://mirror.mage-os.org/"
|
||||
description: "Where to install Magento from"
|
||||
|
||||
magento_version:
|
||||
required: false
|
||||
default: 'magento/project-community-edition:2.4.8-p3'
|
||||
description: "The version of Magento to use. This is only relevant if you are testing an extension."
|
||||
|
||||
apply_fixes:
|
||||
required: false
|
||||
default: 'false'
|
||||
description: "Whether or not to apply fixes during setup."
|
||||
|
||||
mode:
|
||||
required: true
|
||||
default: 'extension'
|
||||
description: "The mode for setup, one of: `extension` or `store`."
|
||||
|
||||
working-directory:
|
||||
required: false
|
||||
default: "."
|
||||
description: "The working directory to run the action in."
|
||||
|
||||
composer_auth:
|
||||
required: false
|
||||
description: "Composer Authentication Credentials"
|
||||
|
||||
outputs:
|
||||
path:
|
||||
description: "The absolute path to where Magento was set up."
|
||||
value: ${{ steps.setup-magento-get-magento-path.outputs.path }}
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Set PHP Version
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ inputs.php-version }}
|
||||
tools: ${{ inputs.tools }}
|
||||
coverage: ${{ inputs.coverage }}
|
||||
extensions: ${{ inputs.coverage }}
|
||||
|
||||
- run: |
|
||||
MAGENTO_DIRECTORY=""
|
||||
if [ "${{ inputs.mode }}" = 'extension' ]; then
|
||||
MAGENTO_DIRECTORY="../magento2"
|
||||
else
|
||||
MAGENTO_DIRECTORY="${{ inputs.working-directory }}"
|
||||
fi
|
||||
echo "MAGENTO_DIRECTORY=$MAGENTO_DIRECTORY" >> $GITHUB_OUTPUT
|
||||
id: setup-magento-compute-directory
|
||||
shell: bash
|
||||
|
||||
- run: |
|
||||
mkdir -p ${{ steps.setup-magento-compute-directory.outputs.MAGENTO_DIRECTORY }}
|
||||
name: Make a directory that may not exist.
|
||||
shell: bash
|
||||
if: inputs.mode == 'extension'
|
||||
|
||||
- run: composer create-project --repository-url="${{ inputs.magento_repository }}" "${{ inputs.magento_version }}" ${{ steps.setup-magento-compute-directory.outputs.MAGENTO_DIRECTORY }} --no-install
|
||||
working-directory: ${{ inputs.working-directory }}
|
||||
shell: bash
|
||||
name: Create Magento ${{ inputs.magento_version }} Project
|
||||
if: inputs.mode == 'extension'
|
||||
env:
|
||||
COMPOSER_AUTH: ${{ inputs.composer_auth }}
|
||||
|
||||
- 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 }}
|
||||
if: inputs.mode == 'extension' || inputs.apply_fixes == 'true'
|
||||
|
||||
- run: |
|
||||
echo "path=$(realpath ${{ steps.setup-magento-compute-directory.outputs.MAGENTO_DIRECTORY }})" >> $GITHUB_OUTPUT
|
||||
shell: bash
|
||||
id: setup-magento-get-magento-path
|
||||
|
||||
branding:
|
||||
icon: "code"
|
||||
color: "green"
|
||||
@@ -1,6 +1,6 @@
|
||||
# Magento 2 Supported Versions
|
||||
|
||||
A Github Action that computes the currently supported Github Actions Matrix for Magento 2 Versions
|
||||
A GitHub Action that computes the currently supported GitHub Actions Matrix for Magento 2 Versions
|
||||
|
||||
All data comes from:
|
||||
|
||||
@@ -11,17 +11,24 @@ All data comes from:
|
||||
|
||||
See the [action.yml](./action.yml)
|
||||
|
||||
| Input | Description | Required | Default |
|
||||
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ----------- |
|
||||
| Input | Description | Required | Default |
|
||||
|-----------------| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- |-----------------------|
|
||||
| kind | The "kind" of support you're targeting for your package. Allowed values are `currently-supported`, `latest`, `custom`, `nightly` and `all` | false | 'currently-supported' |
|
||||
| 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 | '' |
|
||||
| project | The project to return the supported versions for. Allowed values are `mage-os` 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 | '' |
|
||||
|
||||
## Kinds
|
||||
- `currently-supported` - The currently supported Magento Open Source versions by Adobe.
|
||||
- `latest` - The latest version of Magento only.
|
||||
- `custom` - A custom subset of the versions, as specified by you. Requires `custom_versions` sibling key.
|
||||
- `usable` - All versions of Magento, minus any that can no longer be installed or used under normal circumstances.
|
||||
- `nightly` - The nightly version of Magento (only available via `https://upstream-nightly.mage-os.org`)
|
||||
- `all` - All versions of Magento (including patched/unpatched versions).
|
||||
|
||||
## Projects
|
||||
- `mage-os`
|
||||
- `magento-open-source` (default)
|
||||
|
||||
## Usage
|
||||
|
||||
```yml
|
||||
|
||||
@@ -1,24 +1,38 @@
|
||||
name: "Compute Supported Magento 2 Versions"
|
||||
author: "Graycore"
|
||||
name: "Compute Supported Mage-OS and Magento 2 Versions"
|
||||
author: "Mage-OS"
|
||||
description: "A Github Action that computes the Github Actions matrix for the chosen versions of Magento 2"
|
||||
|
||||
inputs:
|
||||
kind:
|
||||
required: false
|
||||
description: "The kind of versions you want to return. Allowed values are `currently-supported`, `latest`, `custom`, `nightly` and `all`"
|
||||
description: "The kind of versions you want to return. Allowed values are `currently-supported`, `latest`, `custom`, `usable`, `nightly`, `recent` and `all`"
|
||||
default: "currently-supported"
|
||||
project:
|
||||
required: false
|
||||
description: "The project to return the supported versions for. Allowed values are `mage-os` and `magento-open-source`"
|
||||
# The default value is what it is to keep backward compatibility
|
||||
default: "magento-open-source"
|
||||
custom_versions:
|
||||
required: false
|
||||
description: "The specific custom versions of Magento that you want to use. Only applies when `kind` is `custom`"
|
||||
default: ""
|
||||
|
||||
recent_time_frame:
|
||||
required: false
|
||||
default: "2y"
|
||||
description: "The time frame (from today). Only used in `recent` kind. String that defines a time duration using a combination of years (y), months (m), and days (d). Each unit is optional and can appear in any order, separated by spaces. For example `2y 2m 2d`. "
|
||||
|
||||
include_services:
|
||||
required: false
|
||||
default: "false"
|
||||
description: "Whether to include a `services` key in each matrix entry with GitHub Actions service configurations."
|
||||
|
||||
outputs:
|
||||
matrix:
|
||||
description: "The Github Actions matrix of software technologies required to run Magento."
|
||||
value: ${{ steps.generate.outputs.matrix }}
|
||||
|
||||
runs:
|
||||
using: "node16"
|
||||
using: "node24"
|
||||
main: dist/index.js
|
||||
|
||||
branding:
|
||||
|
||||
Vendored
+67
-6
File diff suppressed because one or more lines are too long
Generated
+3900
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@graycore/github-actions-magento2-supported-version",
|
||||
"name": "@graycoreio/github-actions-magento2-supported-version",
|
||||
"version": "1.0.0",
|
||||
"description": "A Github Action that computes the currently supported Github Actions Matrix for Magento 2 Versions",
|
||||
"main": "index.js",
|
||||
@@ -9,5 +9,14 @@
|
||||
"test": "jest"
|
||||
},
|
||||
"author": "",
|
||||
"license": "MIT"
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/core": "0.0.0-PLACEHOLDER",
|
||||
"@actions/github": "0.0.0-PLACEHOLDER"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "0.0.0-PLACEHOLDER",
|
||||
"jest": "0.0.0-PLACEHOLDER",
|
||||
"ts-jest": "0.0.0-PLACEHOLDER"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +1,36 @@
|
||||
import * as core from '@actions/core';
|
||||
import { validateOrError } from './kind/compute-kind';
|
||||
import { validateKind } from './kind/validate-kinds';
|
||||
import { getMatrixForKind } from './matrix/get-matrix-for-kind';
|
||||
import { validateProject } from "./project/validate-projects";
|
||||
import { buildServicesForEntry } from "./services/build-services";
|
||||
|
||||
|
||||
export async function run(): Promise<void> {
|
||||
try {
|
||||
try {
|
||||
const kind = core.getInput("kind");
|
||||
validateOrError(kind);
|
||||
|
||||
const customVersions = core.getInput("custom_versions");
|
||||
const project = core.getInput("project");
|
||||
const recent_time_frame = core.getInput("recent_time_frame");
|
||||
const include_services = core.getInput("include_services") === "true";
|
||||
|
||||
core.setOutput('matrix', getMatrixForKind(kind, customVersions));
|
||||
}
|
||||
validateProject(<any>project)
|
||||
|
||||
validateKind(<any>kind, customVersions ? customVersions.split(',') : undefined);
|
||||
|
||||
let matrix = getMatrixForKind(kind, project, customVersions, recent_time_frame);
|
||||
|
||||
if (include_services) {
|
||||
matrix = {
|
||||
magento: matrix.magento,
|
||||
include: matrix.include.map((entry) => ({
|
||||
...entry,
|
||||
services: buildServicesForEntry(entry)
|
||||
}))
|
||||
};
|
||||
}
|
||||
|
||||
core.setOutput('matrix', matrix);
|
||||
}
|
||||
catch (error) {
|
||||
core.setFailed(error.message);
|
||||
}
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
import { isValidKind } from "./compute-kind";
|
||||
|
||||
describe('isValidKind', () => {
|
||||
it('returns `true` if its a valid kind', () => {
|
||||
expect(isValidKind("latest")).toBe(true);
|
||||
});
|
||||
|
||||
it('returns `false` if it is not a valid kind', () => {
|
||||
expect(isValidKind("taco")).toBe(false);
|
||||
})
|
||||
})
|
||||
@@ -1,23 +0,0 @@
|
||||
/**
|
||||
* Acceptable arguments for version `kind`
|
||||
*/
|
||||
export const KNOWN_KINDS = {
|
||||
'currently-supported': true,
|
||||
'latest': true,
|
||||
'custom': true,
|
||||
'nightly': true,
|
||||
'all': true,
|
||||
}
|
||||
|
||||
export const isValidKind = (kind: string): boolean => {
|
||||
return kind in KNOWN_KINDS;
|
||||
};
|
||||
|
||||
export const validateOrError = (kind: string): true => {
|
||||
if(isValidKind(kind)){
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
throw new Error(`Invalid kind provided, supported kinds are: ${Object.keys(KNOWN_KINDS).join(', ')}`);
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
[
|
||||
"magento/project-community-edition:>=2.3 <2.4",
|
||||
"magento/project-community-edition:>=2.4.0 <2.4.1",
|
||||
"magento/project-community-edition:>=2.4.1 <2.4.2",
|
||||
"magento/project-community-edition:>=2.4.2 <2.4.3",
|
||||
"magento/project-community-edition:>=2.4.3 <2.4.4",
|
||||
"magento/project-community-edition:>=2.4.4 <2.4.5",
|
||||
"magento/project-community-edition:>=2.4.5 <2.4.6",
|
||||
"magento/project-community-edition"
|
||||
]
|
||||
@@ -0,0 +1,143 @@
|
||||
import { getCurrentlySupportedVersions } from "./get-currently-supported";
|
||||
import { Project } from "../project/projects";
|
||||
|
||||
describe('getCurrentlySupportedVersions for magento-open-source', () => {
|
||||
const project: Project = "magento-open-source";
|
||||
|
||||
it('should say that v2.4.0 is not supported in 2025', () => {
|
||||
const date: Date = new Date('2025-01-01T00:00:00Z');
|
||||
expect(getCurrentlySupportedVersions(project, date)).not.toContain('magento/project-community-edition:2.4.0');
|
||||
});
|
||||
|
||||
test.each([
|
||||
['2023-01-01T00:00:00Z', 'First day of 2023', [
|
||||
'magento/project-community-edition:2.4.4-p2',
|
||||
'magento/project-community-edition:2.4.5-p1',
|
||||
]],
|
||||
['2023-03-14T00:00:00Z', 'Day of v2.4.6 Release', [
|
||||
'magento/project-community-edition:2.4.4-p2',
|
||||
'magento/project-community-edition:2.4.5-p1'
|
||||
]],
|
||||
['2023-03-15T00:00:00Z', 'Day after v2.4.6 Release', [
|
||||
'magento/project-community-edition:2.4.4-p3',
|
||||
'magento/project-community-edition:2.4.5-p2',
|
||||
'magento/project-community-edition:2.4.6'
|
||||
]],
|
||||
['2023-10-09T00:00:00Z', 'Day before v2.4.6-p3 Release', [
|
||||
'magento/project-community-edition:2.4.4-p5',
|
||||
'magento/project-community-edition:2.4.5-p4',
|
||||
'magento/project-community-edition:2.4.6-p2'
|
||||
]],
|
||||
['2023-10-11T00:00:00Z', 'Day od v2.4.6-p3 Release', [
|
||||
'magento/project-community-edition:2.4.4-p6',
|
||||
'magento/project-community-edition:2.4.5-p5',
|
||||
'magento/project-community-edition:2.4.6-p3'
|
||||
]],
|
||||
['2024-01-01T00:00:00Z', 'First day of 2024', [
|
||||
'magento/project-community-edition:2.4.4-p6',
|
||||
'magento/project-community-edition:2.4.5-p5',
|
||||
'magento/project-community-edition:2.4.6-p3',
|
||||
]],
|
||||
['2024-12-31T00:00:00Z', 'End of 2024', [
|
||||
'magento/project-community-edition:2.4.4-p11',
|
||||
'magento/project-community-edition:2.4.5-p10',
|
||||
'magento/project-community-edition:2.4.6-p8',
|
||||
'magento/project-community-edition:2.4.7-p3',
|
||||
]],
|
||||
['2025-06-09T00:00:00Z', 'Day before new patch releases', [
|
||||
'magento/project-community-edition:2.4.5-p12',
|
||||
'magento/project-community-edition:2.4.6-p10',
|
||||
'magento/project-community-edition:2.4.7-p5',
|
||||
'magento/project-community-edition:2.4.8',
|
||||
]],
|
||||
['2025-06-10T00:00:01Z', 'Day of new patch releases', [
|
||||
'magento/project-community-edition:2.4.5-p13',
|
||||
'magento/project-community-edition:2.4.6-p11',
|
||||
'magento/project-community-edition:2.4.7-p6',
|
||||
'magento/project-community-edition:2.4.8-p1',
|
||||
]],
|
||||
['2025-08-11T00:00:00Z', 'Day Before v2.4.5 EoL', [
|
||||
'magento/project-community-edition:2.4.5-p13',
|
||||
'magento/project-community-edition:2.4.6-p11',
|
||||
'magento/project-community-edition:2.4.7-p6',
|
||||
'magento/project-community-edition:2.4.8-p1',
|
||||
]],
|
||||
['2025-08-12T00:00:00Z', 'Day of v2.4.5 EoL', [
|
||||
'magento/project-community-edition:2.4.5-p13',
|
||||
'magento/project-community-edition:2.4.6-p11',
|
||||
'magento/project-community-edition:2.4.7-p6',
|
||||
'magento/project-community-edition:2.4.8-p1',
|
||||
]],
|
||||
['2025-08-14T00:00:00Z', 'Day after August 2025 patch release', [
|
||||
'magento/project-community-edition:2.4.6-p12',
|
||||
'magento/project-community-edition:2.4.7-p7',
|
||||
'magento/project-community-edition:2.4.8-p2',
|
||||
]],
|
||||
['2025-12-31T00:00:00Z', 'End of 2025', [
|
||||
'magento/project-community-edition:2.4.6-p13',
|
||||
'magento/project-community-edition:2.4.7-p8',
|
||||
'magento/project-community-edition:2.4.8-p3',
|
||||
]],
|
||||
['2026-03-15T00:00:00Z', 'Day after v2.4.6-p14 release', [
|
||||
'magento/project-community-edition:2.4.6-p14',
|
||||
'magento/project-community-edition:2.4.7-p9',
|
||||
'magento/project-community-edition:2.4.8-p4',
|
||||
]],
|
||||
['2027-04-09T00:00:00Z', 'Day of v2.4.7 EoL', [
|
||||
'magento/project-community-edition:2.4.7-p9',
|
||||
'magento/project-community-edition:2.4.8-p4',
|
||||
]],
|
||||
['2027-04-10T00:00:00Z', 'Day after v2.4.7 EoL', [
|
||||
'magento/project-community-edition:2.4.8-p4',
|
||||
]],
|
||||
])(
|
||||
'supportedVersions for %s',
|
||||
(date, description ,result) => {
|
||||
expect(
|
||||
getCurrentlySupportedVersions(project, new Date(date))
|
||||
).toEqual(result);
|
||||
}
|
||||
);
|
||||
})
|
||||
|
||||
describe('getCurrentlySupportedVersions for mage-os', () => {
|
||||
const project: Project = "mage-os";
|
||||
|
||||
it('should say that v1.0.0 is not supported in 2027', () => {
|
||||
const date: Date = new Date('2027-01-01T00:00:00Z');
|
||||
expect(getCurrentlySupportedVersions(project, date)).not.toContain('mage-os/project-community-edition:1.0.0');
|
||||
});
|
||||
|
||||
test.each([
|
||||
['2023-01-01T00:00:00Z', 'First day of 2023', [
|
||||
]],
|
||||
['2023-10-10T15:00:00Z', 'Release of 1.0.0', [
|
||||
'mage-os/project-community-edition:1.0.0',
|
||||
]],
|
||||
['2024-01-01T00:00:00Z', 'First day of 2024', [
|
||||
'mage-os/project-community-edition:1.0.1',
|
||||
]],
|
||||
['2024-07-17T00:00:00Z', 'Day before release of 1.0.2', [
|
||||
'mage-os/project-community-edition:1.0.1',
|
||||
]],
|
||||
['2024-07-18T00:00:01Z', 'Release of 1.0.2', [
|
||||
'mage-os/project-community-edition:1.0.2',
|
||||
]],
|
||||
['2025-04-22T00:00:01Z', 'Release of 1.1.1', [
|
||||
'mage-os/project-community-edition:1.1.1',
|
||||
]],
|
||||
['2025-08-13T00:00:01Z', 'Release of 1.3.0', [
|
||||
'mage-os/project-community-edition:1.3.0',
|
||||
]],
|
||||
['2025-09-09T00:00:01Z', 'Release of 1.3.1', [
|
||||
'mage-os/project-community-edition:1.3.1',
|
||||
]],
|
||||
])(
|
||||
'supportedVersions for %s',
|
||||
(date, description ,result) => {
|
||||
expect(
|
||||
getCurrentlySupportedVersions(project, new Date(date))
|
||||
).toEqual(result);
|
||||
}
|
||||
);
|
||||
})
|
||||
@@ -0,0 +1,13 @@
|
||||
import { PackageMatrixVersion } from '../matrix/matrix-type';
|
||||
import { getIndividualVersionsForProject } from "../versions/get-versions-for-project";
|
||||
|
||||
export const getCurrentlySupportedVersions = (project: string, date: Date): string[] => {
|
||||
const allVersions = getIndividualVersionsForProject(project)
|
||||
return Object.entries(<Record<string,PackageMatrixVersion>>allVersions)
|
||||
.filter(([key, value]) => {
|
||||
const dayOfRelease = new Date(value.release);
|
||||
dayOfRelease.setSeconds(dayOfRelease.getSeconds() + 1);
|
||||
return date >= dayOfRelease && new Date(value.eol) >= date;
|
||||
})
|
||||
.map(([key, value]) => key);
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
import { getUsableVersions } from "./get-usable";
|
||||
import { Project } from "../project/projects";
|
||||
import { getIndividualVersionsForProject } from "../versions/get-versions-for-project";
|
||||
|
||||
// Mock the dependencies
|
||||
jest.mock('../versions/get-versions-for-project');
|
||||
const mockGetVersions = getIndividualVersionsForProject as jest.Mock;
|
||||
|
||||
describe('getUsableVersions for magento-open-source', () => {
|
||||
const project: Project = "magento-open-source";
|
||||
|
||||
beforeEach(() => {
|
||||
mockGetVersions.mockReset();
|
||||
});
|
||||
|
||||
it('should return an array of versions', () => {
|
||||
mockGetVersions.mockReturnValue({
|
||||
'magento/project-community-edition:2.4.6': { composer: '2.2.0' }
|
||||
});
|
||||
expect(Array.isArray(getUsableVersions(project))).toBe(true);
|
||||
});
|
||||
|
||||
it('should filter out versions with composer < 2.0.0', () => {
|
||||
mockGetVersions.mockReturnValue({
|
||||
'magento/project-community-edition:2.4.5': { composer: '1.9.0' },
|
||||
'magento/project-community-edition:2.4.6': { composer: '2.2.0' }
|
||||
});
|
||||
|
||||
const versions = getUsableVersions(project);
|
||||
expect(versions).not.toContain('magento/project-community-edition:2.4.5');
|
||||
expect(versions).toContain('magento/project-community-edition:2.4.6');
|
||||
});
|
||||
|
||||
it('should handle composer version equal to 2.0.0', () => {
|
||||
mockGetVersions.mockReturnValue({
|
||||
'magento/project-community-edition:2.4.6': { composer: '2.0.0' }
|
||||
});
|
||||
|
||||
const versions = getUsableVersions(project);
|
||||
expect(versions).toContain('magento/project-community-edition:2.4.6');
|
||||
});
|
||||
|
||||
it('should handle numeric composer versions', () => {
|
||||
mockGetVersions.mockReturnValue({
|
||||
'magento/project-community-edition:2.3.7-p3': { composer: 1 },
|
||||
'magento/project-community-edition:2.4.6': { composer: 2 }
|
||||
});
|
||||
|
||||
const versions = getUsableVersions(project);
|
||||
expect(versions).not.toContain('magento/project-community-edition:2.3.7-p3');
|
||||
expect(versions).toContain('magento/project-community-edition:2.4.6');
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,23 @@
|
||||
import { PackageMatrixVersion } from '../matrix/matrix-type';
|
||||
import { getIndividualVersionsForProject } from "../versions/get-versions-for-project";
|
||||
import semver from 'semver';
|
||||
|
||||
export const getUsableVersions = (project: string): string[] => {
|
||||
const allVersions = getIndividualVersionsForProject(project)
|
||||
return Object.entries(<Record<string,PackageMatrixVersion>>allVersions)
|
||||
.filter(([key, value]) => {
|
||||
/**
|
||||
* Filter out any versions that are not 'usable', and cannot be successfully installed
|
||||
* anymore for modern systems or other reasons outside our control.
|
||||
*/
|
||||
|
||||
// Packagist retired support for Composer 1 on 2025-09-01.
|
||||
const composerVersion = semver.coerce(value.composer.toString());
|
||||
if (composerVersion && semver.lt(composerVersion, '2.0.0')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
})
|
||||
.map(([key, value]) => key);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Acceptable arguments for version `kind`
|
||||
*/
|
||||
export const KNOWN_KINDS = {
|
||||
'currently-supported': true,
|
||||
'latest': true,
|
||||
'custom': true,
|
||||
'usable': true,
|
||||
'nightly': true,
|
||||
'recent': true,
|
||||
'all': true,
|
||||
}
|
||||
|
||||
export type Kind = keyof typeof KNOWN_KINDS;
|
||||
@@ -1,3 +0,0 @@
|
||||
[
|
||||
"magento/project-community-edition"
|
||||
]
|
||||
@@ -1,3 +0,0 @@
|
||||
[
|
||||
"magento/project-community-edition:next"
|
||||
]
|
||||
@@ -0,0 +1,79 @@
|
||||
import { Project } from "../project/projects";
|
||||
import { getRecentVersions } from "./recent";
|
||||
|
||||
describe('recent for magento-open-source', () => {
|
||||
const project: Project = "magento-open-source";
|
||||
|
||||
test.each([
|
||||
['2024-12-31T00:00:00Z', 'End of 2024', [
|
||||
"magento/project-community-edition:2.4.4-p7",
|
||||
"magento/project-community-edition:2.4.4-p8",
|
||||
"magento/project-community-edition:2.4.4-p9",
|
||||
"magento/project-community-edition:2.4.4-p10",
|
||||
"magento/project-community-edition:2.4.4-p11",
|
||||
"magento/project-community-edition:2.4.5-p6",
|
||||
"magento/project-community-edition:2.4.5-p7",
|
||||
"magento/project-community-edition:2.4.5-p8",
|
||||
"magento/project-community-edition:2.4.5-p9",
|
||||
"magento/project-community-edition:2.4.5-p10",
|
||||
"magento/project-community-edition:2.4.6-p4",
|
||||
"magento/project-community-edition:2.4.6-p5",
|
||||
"magento/project-community-edition:2.4.6-p6",
|
||||
"magento/project-community-edition:2.4.6-p7",
|
||||
"magento/project-community-edition:2.4.6-p8",
|
||||
"magento/project-community-edition:2.4.7",
|
||||
"magento/project-community-edition:2.4.7-p1",
|
||||
"magento/project-community-edition:2.4.7-p2",
|
||||
"magento/project-community-edition:2.4.7-p3",
|
||||
]],
|
||||
['2025-04-08T00:00:00Z', 'The day Damien wrote a test.', [
|
||||
"magento/project-community-edition:2.4.4-p9",
|
||||
"magento/project-community-edition:2.4.4-p10",
|
||||
"magento/project-community-edition:2.4.4-p11",
|
||||
"magento/project-community-edition:2.4.4-p12",
|
||||
"magento/project-community-edition:2.4.5-p8",
|
||||
"magento/project-community-edition:2.4.5-p9",
|
||||
"magento/project-community-edition:2.4.5-p10",
|
||||
"magento/project-community-edition:2.4.5-p11",
|
||||
"magento/project-community-edition:2.4.6-p6",
|
||||
"magento/project-community-edition:2.4.6-p7",
|
||||
"magento/project-community-edition:2.4.6-p8",
|
||||
"magento/project-community-edition:2.4.6-p9",
|
||||
"magento/project-community-edition:2.4.7-p1",
|
||||
"magento/project-community-edition:2.4.7-p2",
|
||||
"magento/project-community-edition:2.4.7-p3",
|
||||
"magento/project-community-edition:2.4.7-p4",
|
||||
]],
|
||||
['2025-08-08T00:00:00Z', 'Day Before v2.4.5 EoL', [
|
||||
"magento/project-community-edition:2.4.4-p10",
|
||||
"magento/project-community-edition:2.4.4-p11",
|
||||
"magento/project-community-edition:2.4.4-p12",
|
||||
"magento/project-community-edition:2.4.4-p13",
|
||||
"magento/project-community-edition:2.4.5-p9",
|
||||
"magento/project-community-edition:2.4.5-p10",
|
||||
"magento/project-community-edition:2.4.5-p11",
|
||||
"magento/project-community-edition:2.4.5-p12",
|
||||
"magento/project-community-edition:2.4.5-p13",
|
||||
"magento/project-community-edition:2.4.6-p7",
|
||||
"magento/project-community-edition:2.4.6-p8",
|
||||
"magento/project-community-edition:2.4.6-p9",
|
||||
"magento/project-community-edition:2.4.6-p10",
|
||||
"magento/project-community-edition:2.4.6-p11",
|
||||
"magento/project-community-edition:2.4.7-p2",
|
||||
"magento/project-community-edition:2.4.7-p3",
|
||||
"magento/project-community-edition:2.4.7-p4",
|
||||
"magento/project-community-edition:2.4.7-p5",
|
||||
"magento/project-community-edition:2.4.7-p6",
|
||||
"magento/project-community-edition:2.4.8",
|
||||
"magento/project-community-edition:2.4.8-p1"
|
||||
]],
|
||||
])(
|
||||
'recent for %s',
|
||||
(date, description ,result) => {
|
||||
expect(
|
||||
getRecentVersions(project, new Date(date), '360d')
|
||||
).toEqual(result);
|
||||
}
|
||||
);
|
||||
})
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
import { PackageMatrixVersion } from '../matrix/matrix-type';
|
||||
import { getIndividualVersionsForProject } from "../versions/get-versions-for-project";
|
||||
|
||||
export const getRecentVersions = (project: string, date: Date, durationStr: string): string[] => {
|
||||
const regex = /(?:(\d+)\s*y)?\s*(?:(\d+)\s*m)?\s*(?:(\d+)\s*d)?/i;
|
||||
const match = durationStr.match(regex);
|
||||
|
||||
if (!match) {
|
||||
throw new Error(`Invalid duration string: ${durationStr}`);
|
||||
}
|
||||
|
||||
const years = parseInt(match[1] || "0", 10);
|
||||
const months = parseInt(match[2] || "0", 10);
|
||||
const days = parseInt(match[3] || "0", 10);
|
||||
|
||||
const allVersions = getIndividualVersionsForProject(project)
|
||||
return Object.entries(<Record<string,PackageMatrixVersion>>allVersions)
|
||||
.filter(([key, value]) => {
|
||||
const dayOfRelease = new Date(value.release);
|
||||
dayOfRelease.setSeconds(dayOfRelease.getSeconds() + 1);
|
||||
const dateAfterRelease = new Date(value.release);
|
||||
|
||||
dateAfterRelease.setFullYear(dateAfterRelease.getFullYear() + years);
|
||||
dateAfterRelease.setMonth(dateAfterRelease.getMonth() + months);
|
||||
dateAfterRelease.setDate(dateAfterRelease.getDate() + days);
|
||||
|
||||
|
||||
return date >= dayOfRelease && date <= dateAfterRelease;
|
||||
})
|
||||
.map(([key, value]) => key);
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"mage-os": ["mage-os/project-community-edition"],
|
||||
"magento-open-source": ["magento/project-community-edition"]
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"mage-os": ["mage-os/project-community-edition:next"],
|
||||
"magento-open-source": ["magento/project-community-edition:next"]
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import { validateKind } from "./validate-kinds";
|
||||
|
||||
describe('validateKind', () => {
|
||||
it('returns `true` if its a valid kind', () => {
|
||||
expect(validateKind("latest")).toBe(true);
|
||||
});
|
||||
|
||||
it('throws a helpful exception if its an invalid kind', () => {
|
||||
expect(() => validateKind(<any>"taco")).toThrowError();
|
||||
})
|
||||
|
||||
it('throws a helpful exception if custom versions are provided with the wrong kind', () => {
|
||||
expect(() => validateKind(<any>"latest", [])).toThrowError();
|
||||
})
|
||||
|
||||
it('returns `true` for kind `custom` with a custom versions', () => {
|
||||
expect(validateKind("custom", "mage-os/project-community-edition:1.0.0".split(","))).toBe(true);
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,12 @@
|
||||
import { customVersionsValidator } from "./validations/custom-versions-validator";
|
||||
import { isKnownKind } from "./validations/is-known-kind";
|
||||
import { KindValidator } from "./validator";
|
||||
|
||||
export const validateKind: KindValidator = (kind, custom_versions = null): boolean => {
|
||||
return validators.reduce((acc, el) => el(kind, custom_versions), true);
|
||||
}
|
||||
|
||||
export const validators: KindValidator[] = [
|
||||
isKnownKind,
|
||||
customVersionsValidator,
|
||||
];
|
||||
@@ -0,0 +1,8 @@
|
||||
import { KindValidator } from "../validator";
|
||||
|
||||
export const customVersionsValidator: KindValidator = (kind, customVersions) => {
|
||||
if(customVersions && kind !== 'custom') {
|
||||
throw new Error('`custom_versions` can only be used with kind `custom`');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import { KNOWN_KINDS, Kind } from "../kinds";
|
||||
|
||||
export const isKnownKind = (kind: Kind): boolean => {
|
||||
if(!(kind in KNOWN_KINDS)) {
|
||||
throw new Error(
|
||||
`Invalid kind provided, supported kinds are: ${Object.keys(KNOWN_KINDS).join(', ')}`
|
||||
);
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
import { Kind } from "./kinds";
|
||||
|
||||
export type KindValidator = (kind: Kind, custom_versions?: string[]) => boolean;
|
||||
@@ -1,49 +1,138 @@
|
||||
import { getMatrixForKind } from "./get-matrix-for-kind";
|
||||
|
||||
describe('getMatrixForKind', () => {
|
||||
|
||||
describe('getMatrixForKind for mage-os', () => {
|
||||
const project = "mage-os";
|
||||
|
||||
it('returns a matrix for `latest`', () => {
|
||||
const result = getMatrixForKind("latest");
|
||||
const result = getMatrixForKind("latest", project);
|
||||
|
||||
expect(result.magento).toBeDefined();
|
||||
expect(result.include).toBeDefined();
|
||||
});
|
||||
|
||||
it('returns a single-element matrix for with a matrix "magento" for `latest`', () => {
|
||||
const result = getMatrixForKind("latest", project);
|
||||
expect(result.magento.length).toEqual(1);
|
||||
expect(result.include.length).toEqual(1);
|
||||
expect(result.magento[0]).toEqual(result.include[0].magento);
|
||||
});
|
||||
|
||||
it('returns a matrix for `currently-supported`', () => {
|
||||
const result = getMatrixForKind("currently-supported");
|
||||
const result = getMatrixForKind("currently-supported", project);
|
||||
|
||||
expect(result.magento).toBeDefined();
|
||||
expect(result.include).toBeDefined();
|
||||
});
|
||||
|
||||
it('returns a matrix for `all`', () => {
|
||||
const result = getMatrixForKind("all");
|
||||
const result = getMatrixForKind("all", project);
|
||||
|
||||
expect(result.magento).toBeDefined();
|
||||
expect(result.include).toBeDefined();
|
||||
});
|
||||
|
||||
it('returns a matrix for valid `custom`', () => {
|
||||
const result = getMatrixForKind("custom", "magento/project-community-edition:2.3.7-p3");
|
||||
const result = getMatrixForKind("custom", project, "mage-os/project-community-edition:1.0.0");
|
||||
|
||||
expect(result.magento).toBeDefined();
|
||||
expect(result.include).toBeDefined();
|
||||
expect(result.magento[0]).toBe('mage-os/project-community-edition:1.0.0');
|
||||
});
|
||||
|
||||
it('returns a matrix nightly`', () => {
|
||||
const result = getMatrixForKind("nightly", project);
|
||||
expect(result.magento).toBeDefined();
|
||||
expect(result.include).toBeDefined();
|
||||
expect(result.magento[0]).toBe('mage-os/project-community-edition:@alpha');
|
||||
});
|
||||
|
||||
it('returns a matrix for the next release when using `nightly`', () => {
|
||||
const result = getMatrixForKind("nightly", project, "mage-os/project-community-edition:next");
|
||||
|
||||
expect(result.magento).toBeDefined();
|
||||
expect(result.include).toBeDefined();
|
||||
});
|
||||
|
||||
it('returns a single-element matrix for with a matrix "magento" for `nightly`', () => {
|
||||
const result = getMatrixForKind("nightly", project);
|
||||
expect(result.magento.length).toEqual(1);
|
||||
expect(result.include.length).toEqual(1);
|
||||
expect(result.magento[0]).toEqual(result.include[0].magento);
|
||||
});
|
||||
|
||||
it('errors for invalid `custom``', () => {
|
||||
expect(() => getMatrixForKind("custom", project)).toThrowError();
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
describe('getMatrixForKind for magento-open-source', () => {
|
||||
const project = "magento-open-source";
|
||||
|
||||
it('returns a matrix nightly`', () => {
|
||||
const result = getMatrixForKind("nightly", project);
|
||||
expect(result.magento).toBeDefined();
|
||||
expect(result.include).toBeDefined();
|
||||
});
|
||||
|
||||
it('returns a matrix for `latest`', () => {
|
||||
const result = getMatrixForKind("latest", project);
|
||||
console.log(result);
|
||||
expect(result.magento).toBeDefined();
|
||||
expect(result.include).toBeDefined();
|
||||
});
|
||||
|
||||
it('returns a single-element matrix for with a matrix "magento" for `latest`', () => {
|
||||
const result = getMatrixForKind("latest", project);
|
||||
expect(result.magento.length).toEqual(1);
|
||||
expect(result.include.length).toEqual(1);
|
||||
expect(result.magento[0]).toEqual(result.include[0].magento);
|
||||
});
|
||||
|
||||
it('returns a matrix for `currently-supported`', () => {
|
||||
const result = getMatrixForKind("currently-supported", project);
|
||||
|
||||
expect(result.magento).toBeDefined();
|
||||
expect(result.include).toBeDefined();
|
||||
});
|
||||
|
||||
it('returns a matrix for `all`', () => {
|
||||
const result = getMatrixForKind("all", project);
|
||||
|
||||
expect(result.magento).toBeDefined();
|
||||
expect(result.include).toBeDefined();
|
||||
});
|
||||
|
||||
it('returns a matrix for valid `custom`', () => {
|
||||
const result = getMatrixForKind("custom", project, "magento/project-community-edition:2.4.2");
|
||||
|
||||
expect(result.magento).toBeDefined();
|
||||
expect(result.include).toBeDefined();
|
||||
});
|
||||
|
||||
it('returns a matrix for the next release when using `nightly`', () => {
|
||||
const result = getMatrixForKind("nightly", "magento/project-community-edition:next");
|
||||
const result = getMatrixForKind("nightly", project, "magento/project-community-edition:next");
|
||||
|
||||
expect(result.magento).toBeDefined();
|
||||
expect(result.include).toBeDefined();
|
||||
});
|
||||
|
||||
it('returns a single-element matrix for with a matrix "magento" for `nightly`', () => {
|
||||
const result = getMatrixForKind("nightly", project);
|
||||
expect(result.magento.length).toEqual(1);
|
||||
expect(result.include.length).toEqual(1);
|
||||
expect(result.magento[0]).toEqual(result.include[0].magento);
|
||||
});
|
||||
|
||||
it('returns a matrix for valid multiple `custom`', () => {
|
||||
const result = getMatrixForKind("custom", "magento/project-community-edition:2.3.7-p3,magento/project-community-edition:2.4.0");
|
||||
const result = getMatrixForKind("custom", project, "magento/project-community-edition:2.4.2,magento/project-community-edition:2.4.3");
|
||||
|
||||
expect(result.magento).toBeDefined();
|
||||
expect(result.include).toBeDefined();
|
||||
});
|
||||
|
||||
it('errors for invalid `custom``', () => {
|
||||
expect(() => getMatrixForKind("custom")).toThrowError();
|
||||
expect(() => getMatrixForKind("custom", project)).toThrowError();
|
||||
});
|
||||
})
|
||||
@@ -1,24 +1,30 @@
|
||||
import { getMatrixForVersions } from "./get-matrix-for-versions";
|
||||
|
||||
import latestJson from '../kind/latest.json';
|
||||
import currentlySupportedJson from '../kind/currently-supported.json';
|
||||
import allVersions from '../versions/individual.json';
|
||||
import nightly from '../kind/nightly.json';
|
||||
import { amendMatrixForNext } from "../nightly/get-next-version";
|
||||
import { getIndividualVersionsForProject } from "../versions/get-versions-for-project";
|
||||
import latestJson from '../kind/special-versions/latest.json';
|
||||
import nightlyJson from '../kind/special-versions/nightly.json';
|
||||
import { getDayBefore } from '../nightly/get-day-before';
|
||||
import { getCurrentlySupportedVersions } from "../kind/get-currently-supported";
|
||||
import { getUsableVersions } from "../kind/get-usable";
|
||||
import { amendMatrixForNext } from "../nightly/amend-matrix-for-next";
|
||||
import { getRecentVersions } from "../kind/recent";
|
||||
|
||||
export const getMatrixForKind = (kind: string, versions: string = "") => {
|
||||
export const getMatrixForKind = (kind: string, project: string, versions = "", recent_time_frame = '2y') => {
|
||||
|
||||
switch(kind){
|
||||
case 'latest':
|
||||
return getMatrixForVersions(latestJson);
|
||||
return getMatrixForVersions(project, latestJson[project]);
|
||||
case 'currently-supported':
|
||||
return getMatrixForVersions(currentlySupportedJson);
|
||||
return getMatrixForVersions(project, getCurrentlySupportedVersions(project, new Date()));
|
||||
case 'usable':
|
||||
return getMatrixForVersions(project, getUsableVersions(project));
|
||||
case 'nightly':
|
||||
return amendMatrixForNext(getMatrixForVersions(nightly), 'https://upstream-mirror.mage-os.org', getDayBefore());
|
||||
return amendMatrixForNext(getMatrixForVersions(project, nightlyJson[project]), 'https://upstream-nightly.mage-os.org', getDayBefore());
|
||||
case 'all':
|
||||
return getMatrixForVersions(Object.keys(allVersions));
|
||||
return getMatrixForVersions(project, Object.keys(getIndividualVersionsForProject(project)));
|
||||
case 'custom':
|
||||
return getMatrixForVersions(versions.split(","))
|
||||
return getMatrixForVersions(project, versions.split(","))
|
||||
case 'recent':
|
||||
return getMatrixForVersions(project, getRecentVersions(project, new Date(), recent_time_frame));
|
||||
default:
|
||||
throw new Error(`Unreachable kind: ${kind} discovered, please report to the maintainers.`);
|
||||
}
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
import { GithubActionsMatrix, MagentoMatrixVersion } from "./matrix-type";
|
||||
import compositeVersionJson from '../versions/composite.json';
|
||||
import individualVersionJson from '../versions/individual.json';
|
||||
|
||||
const knownVersions : Record<string, MagentoMatrixVersion> = {...individualVersionJson, ...compositeVersionJson };
|
||||
import { GithubActionsMatrix, PackageMatrixVersion } from "./matrix-type";
|
||||
import { getIndividualVersionsForProject, getCompositeVersionsForProject } from "../versions/get-versions-for-project";
|
||||
|
||||
/**
|
||||
* Computes the Github Actions Matrix for given versions of Magento
|
||||
* Computes the GitHub Actions Matrix for given versions of Magento
|
||||
*/
|
||||
export const getMatrixForVersions = (versions: string[]): GithubActionsMatrix => {
|
||||
export const getMatrixForVersions = (project: string, versions: string[]): GithubActionsMatrix => {
|
||||
const knownVersions : Record<string, PackageMatrixVersion> = {
|
||||
...getIndividualVersionsForProject(project), ...getCompositeVersionsForProject(project)
|
||||
}
|
||||
|
||||
return versions.reduce((acc, current): GithubActionsMatrix => {
|
||||
if(knownVersions[current] === undefined){
|
||||
throw new Error("Unknown version while computing matrix");
|
||||
if (knownVersions[current] === undefined){
|
||||
throw new Error(`Unknown "${current}" version while computing matrix`);
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
@@ -1,17 +1,33 @@
|
||||
export interface MagentoMatrixVersion {
|
||||
export interface ServiceConfig {
|
||||
image: string;
|
||||
env?: Record<string, string>;
|
||||
ports?: string[];
|
||||
options?: string;
|
||||
}
|
||||
|
||||
export interface Services {
|
||||
[serviceName: string]: ServiceConfig;
|
||||
}
|
||||
|
||||
export interface PackageMatrixVersion {
|
||||
magento: string,
|
||||
php: string | number,
|
||||
composer: string | number,
|
||||
mysql: string,
|
||||
elasticsearch: string,
|
||||
opensearch: string,
|
||||
rabbitmq: string,
|
||||
redis: string,
|
||||
varnish: string,
|
||||
valkey: string,
|
||||
nginx: string,
|
||||
os: string
|
||||
os: string,
|
||||
release: string,
|
||||
eol: string,
|
||||
services?: Services
|
||||
}
|
||||
|
||||
export interface GithubActionsMatrix {
|
||||
magento: string[],
|
||||
include: MagentoMatrixVersion[]
|
||||
include: PackageMatrixVersion[]
|
||||
}
|
||||
@@ -0,0 +1,243 @@
|
||||
import { amendMatrixForNext } from "./amend-matrix-for-next";
|
||||
|
||||
describe('amendMatrixForNext', () => {
|
||||
it('should amend the "next" versions listed in the matrix output for the given repo', () => {
|
||||
expect(
|
||||
amendMatrixForNext(
|
||||
{
|
||||
include: [
|
||||
{
|
||||
"magento": "magento/project-community-edition:next",
|
||||
"php": 8.2,
|
||||
"composer": "2",
|
||||
"mysql": "mysql:8.0",
|
||||
"elasticsearch": "elasticsearch:8.5.3",
|
||||
"opensearch": "",
|
||||
"rabbitmq": "rabbitmq:3.11-management",
|
||||
"redis": "redis:7.0",
|
||||
"valkey": "",
|
||||
"varnish": "varnish:7.3",
|
||||
"nginx": "nginx:1.22",
|
||||
"os": "ubuntu-latest",
|
||||
"release": "2023-09-15T00:00:00+0000",
|
||||
"eol": "2026-09-15T00:00:00+0000"
|
||||
}
|
||||
],
|
||||
magento: ["magento/project-community-edition:next"]
|
||||
},
|
||||
"https://upstream-nightly.mage-os.org",
|
||||
new Date()
|
||||
)
|
||||
).toEqual(
|
||||
{
|
||||
include: [
|
||||
{
|
||||
"magento": "magento/project-community-edition:@alpha",
|
||||
"php": 8.2,
|
||||
"composer": "2",
|
||||
"mysql": "mysql:8.0",
|
||||
"elasticsearch": "elasticsearch:8.5.3",
|
||||
"opensearch": "",
|
||||
"rabbitmq": "rabbitmq:3.11-management",
|
||||
"redis": "redis:7.0",
|
||||
"valkey": "",
|
||||
"varnish": "varnish:7.3",
|
||||
"nginx": "nginx:1.22",
|
||||
"os": "ubuntu-latest",
|
||||
"release": "2023-09-15T00:00:00+0000",
|
||||
"eol": "2026-09-15T00:00:00+0000"
|
||||
}
|
||||
],
|
||||
magento: ["magento/project-community-edition:@alpha"]
|
||||
}
|
||||
)
|
||||
});
|
||||
|
||||
it('should should do nothing to matrixes that contain no next versions', () => {
|
||||
expect(
|
||||
amendMatrixForNext(
|
||||
{
|
||||
include: [
|
||||
{
|
||||
"magento": "magento/project-community-edition:v2.4.6-p2",
|
||||
"php": 8.2,
|
||||
"composer": "2",
|
||||
"mysql": "mysql:8.0",
|
||||
"elasticsearch": "elasticsearch:8.5.3",
|
||||
"opensearch": "",
|
||||
"rabbitmq": "rabbitmq:3.11-management",
|
||||
"redis": "redis:7.0",
|
||||
"valkey": "",
|
||||
"varnish": "varnish:7.3",
|
||||
"nginx": "nginx:1.22",
|
||||
"os": "ubuntu-latest",
|
||||
"release": "2023-09-15T00:00:00+0000",
|
||||
"eol": "2026-09-15T00:00:00+0000"
|
||||
}
|
||||
],
|
||||
magento: ["magento/project-community-edition:v2.4.6-p2"]
|
||||
},
|
||||
"https://upstream-nightly.mage-os.org",
|
||||
new Date()
|
||||
)
|
||||
).toEqual(
|
||||
{
|
||||
include: [
|
||||
{
|
||||
"magento": "magento/project-community-edition:v2.4.6-p2",
|
||||
"php": 8.2,
|
||||
"composer": "2",
|
||||
"mysql": "mysql:8.0",
|
||||
"elasticsearch": "elasticsearch:8.5.3",
|
||||
"opensearch": "",
|
||||
"rabbitmq": "rabbitmq:3.11-management",
|
||||
"redis": "redis:7.0",
|
||||
"valkey": "",
|
||||
"varnish": "varnish:7.3",
|
||||
"nginx": "nginx:1.22",
|
||||
"os": "ubuntu-latest",
|
||||
"release": "2023-09-15T00:00:00+0000",
|
||||
"eol": "2026-09-15T00:00:00+0000"
|
||||
}
|
||||
],
|
||||
magento: ["magento/project-community-edition:v2.4.6-p2"]
|
||||
}
|
||||
)
|
||||
});
|
||||
|
||||
it('should only modify next versions', () => {
|
||||
expect(
|
||||
amendMatrixForNext(
|
||||
{
|
||||
include: [
|
||||
{
|
||||
"magento": "magento/project-community-edition:v2.4.6-p2",
|
||||
"php": 8.2,
|
||||
"composer": "2",
|
||||
"mysql": "mysql:8.0",
|
||||
"elasticsearch": "elasticsearch:8.5.3",
|
||||
"opensearch": "",
|
||||
"rabbitmq": "rabbitmq:3.11-management",
|
||||
"redis": "redis:7.0",
|
||||
"valkey": "",
|
||||
"varnish": "varnish:7.3",
|
||||
"nginx": "nginx:1.22",
|
||||
"os": "ubuntu-latest",
|
||||
"release": "2023-09-15T00:00:00+0000",
|
||||
"eol": "2026-09-15T00:00:00+0000"
|
||||
},
|
||||
{
|
||||
"magento": "magento/project-community-edition:next",
|
||||
"php": 8.2,
|
||||
"composer": "2",
|
||||
"mysql": "mysql:8.0",
|
||||
"elasticsearch": "elasticsearch:8.5.3",
|
||||
"opensearch": "",
|
||||
"rabbitmq": "rabbitmq:3.11-management",
|
||||
"redis": "redis:7.0",
|
||||
"valkey": "",
|
||||
"varnish": "varnish:7.3",
|
||||
"nginx": "nginx:1.22",
|
||||
"os": "ubuntu-latest",
|
||||
"release": "2023-09-15T00:00:00+0000",
|
||||
"eol": "2026-09-15T00:00:00+0000"
|
||||
}
|
||||
],
|
||||
magento: ["magento/project-community-edition:v2.4.6-p2", "magento/project-community-edition:next"]
|
||||
},
|
||||
"https://upstream-nightly.mage-os.org",
|
||||
new Date()
|
||||
)
|
||||
).toEqual(
|
||||
{
|
||||
include: [
|
||||
{
|
||||
"magento": "magento/project-community-edition:v2.4.6-p2",
|
||||
"php": 8.2,
|
||||
"composer": "2",
|
||||
"mysql": "mysql:8.0",
|
||||
"elasticsearch": "elasticsearch:8.5.3",
|
||||
"opensearch": "",
|
||||
"rabbitmq": "rabbitmq:3.11-management",
|
||||
"redis": "redis:7.0",
|
||||
"valkey": "",
|
||||
"varnish": "varnish:7.3",
|
||||
"nginx": "nginx:1.22",
|
||||
"os": "ubuntu-latest",
|
||||
"release": "2023-09-15T00:00:00+0000",
|
||||
"eol": "2026-09-15T00:00:00+0000"
|
||||
},
|
||||
{
|
||||
"magento": "magento/project-community-edition:@alpha",
|
||||
"php": 8.2,
|
||||
"composer": "2",
|
||||
"mysql": "mysql:8.0",
|
||||
"elasticsearch": "elasticsearch:8.5.3",
|
||||
"opensearch": "",
|
||||
"rabbitmq": "rabbitmq:3.11-management",
|
||||
"redis": "redis:7.0",
|
||||
"valkey": "",
|
||||
"varnish": "varnish:7.3",
|
||||
"nginx": "nginx:1.22",
|
||||
"os": "ubuntu-latest",
|
||||
"release": "2023-09-15T00:00:00+0000",
|
||||
"eol": "2026-09-15T00:00:00+0000"
|
||||
}
|
||||
],
|
||||
magento: ["magento/project-community-edition:v2.4.6-p2", "magento/project-community-edition:@alpha"]
|
||||
}
|
||||
)
|
||||
});
|
||||
|
||||
it('should amend the "next" versions listed in the matrix output for the given repo, for a different project', () => {
|
||||
expect(
|
||||
amendMatrixForNext(
|
||||
{
|
||||
include: [
|
||||
{
|
||||
"magento": "mage-os/project-community-edition:next",
|
||||
"php": 8.2,
|
||||
"composer": "2",
|
||||
"mysql": "mysql:8.0",
|
||||
"elasticsearch": "elasticsearch:8.5.3",
|
||||
"opensearch": "",
|
||||
"rabbitmq": "rabbitmq:3.11-management",
|
||||
"redis": "redis:7.0",
|
||||
"valkey": "",
|
||||
"varnish": "varnish:7.3",
|
||||
"nginx": "nginx:1.22",
|
||||
"os": "ubuntu-latest",
|
||||
"release": "2023-09-15T00:00:00+0000",
|
||||
"eol": "2026-09-15T00:00:00+0000"
|
||||
}
|
||||
],
|
||||
magento: ["mage-os/project-community-edition:next"]
|
||||
},
|
||||
"https://upstream-nightly.mage-os.org",
|
||||
new Date()
|
||||
)
|
||||
).toEqual(
|
||||
{
|
||||
include: [
|
||||
{
|
||||
"magento": "mage-os/project-community-edition:@alpha",
|
||||
"php": 8.2,
|
||||
"composer": "2",
|
||||
"mysql": "mysql:8.0",
|
||||
"elasticsearch": "elasticsearch:8.5.3",
|
||||
"opensearch": "",
|
||||
"rabbitmq": "rabbitmq:3.11-management",
|
||||
"redis": "redis:7.0",
|
||||
"valkey": "",
|
||||
"varnish": "varnish:7.3",
|
||||
"nginx": "nginx:1.22",
|
||||
"os": "ubuntu-latest",
|
||||
"release": "2023-09-15T00:00:00+0000",
|
||||
"eol": "2026-09-15T00:00:00+0000"
|
||||
}
|
||||
],
|
||||
magento: ["mage-os/project-community-edition:@alpha"]
|
||||
}
|
||||
)
|
||||
});
|
||||
})
|
||||
@@ -0,0 +1,23 @@
|
||||
import { GithubActionsMatrix } from "../matrix/matrix-type";
|
||||
import { Repository } from "./repository";
|
||||
import { unifyNextPackageName } from "./unify-next-package-name";
|
||||
|
||||
/**
|
||||
* A placeholder value use to refer to the next version of Magento.
|
||||
* This value is just a placeholder, there is no "next" version (as of authoring).
|
||||
*/
|
||||
export const nextVersionPlaceHolder = "next";
|
||||
|
||||
export const amendMatrixForNext = (matrix: GithubActionsMatrix, repository: Repository, date: Date = new Date()): GithubActionsMatrix => {
|
||||
const nextVersionRegExp = new RegExp(nextVersionPlaceHolder + '$');
|
||||
matrix.magento = matrix.magento.map((item) => item.match(nextVersionRegExp) ? unifyNextPackageName(item, repository, date) : item);
|
||||
matrix.include = matrix.include.map((item) => {
|
||||
return item.magento.match(nextVersionRegExp)
|
||||
? {
|
||||
...item,
|
||||
magento: unifyNextPackageName(item.magento, repository, date),
|
||||
}
|
||||
: item;
|
||||
});
|
||||
return matrix;
|
||||
}
|
||||
@@ -1,12 +1,15 @@
|
||||
import { getNextVersion } from "./get-next-version"
|
||||
|
||||
describe('getNextVersion', () => {
|
||||
it('should get the next nightly version for Magento Open Source', () => {
|
||||
expect(getNextVersion('https://upstream-nightly.mage-os.org', new Date('2022-09-29T17:47:00')), ).toEqual('@alpha');
|
||||
});
|
||||
|
||||
it('should get the next nightly version for MageOS', () => {
|
||||
expect(getNextVersion('https://upstream-mirror.mage-os.org', new Date('2022-09-29T17:47:00')), ).toEqual('@alpha');
|
||||
it('should get the next nightly version for Mage-OS', () => {
|
||||
expect(getNextVersion('https://nightly.mage-os.org', new Date('2024-09-29T17:47:00')), ).toEqual('@alpha');
|
||||
});
|
||||
|
||||
it('should handle the first of the month correctly', () => {
|
||||
expect(getNextVersion('https://upstream-mirror.mage-os.org', new Date('2022-01-01T17:47:00')), ).toEqual('@alpha');
|
||||
expect(getNextVersion('https://upstream-nightly.mage-os.org', new Date('2022-01-01T17:47:00')), ).toEqual('@alpha');
|
||||
});
|
||||
})
|
||||
@@ -1,44 +1,15 @@
|
||||
import { GithubActionsMatrix } from "../matrix/matrix-type";
|
||||
|
||||
export type Repository = "https://upstream-mirror.mage-os.org" | "https://repo.magento.com";
|
||||
|
||||
/**
|
||||
* A placeholder value use to refer to the next version of Magento.
|
||||
* This value is just a placeholder, there is no "next" version (as of authoring).
|
||||
*/
|
||||
export const nextVersionPlaceHolder = "magento/project-community-edition:next";
|
||||
import { Repository } from "./repository";
|
||||
|
||||
/**
|
||||
* Get the next version of Magento, as determined by the repository.
|
||||
*/
|
||||
export const getNextVersion = (repository: Repository, date: Date) => {
|
||||
switch(repository){
|
||||
case "https://upstream-mirror.mage-os.org":
|
||||
case "https://nightly.mage-os.org":
|
||||
case "https://upstream-nightly.mage-os.org":
|
||||
// See: https://github.com/mage-os/generate-mirror-repo-js/blob/bbbdf1708ea0bf8fc845aad8240d00f37632b4a7/src/release-branch-build-tools.js#L71
|
||||
return "@alpha";
|
||||
default:
|
||||
return "";
|
||||
return "next";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export const replaceNextPlaceHolderWithVersion = (packageName: string, nextVersion: string) => {
|
||||
return packageName.replace(/(?!:)next$/, nextVersion);
|
||||
}
|
||||
|
||||
export const computeNextPackage = (packageName: string, repository: Repository, date: Date): string => {
|
||||
return replaceNextPlaceHolderWithVersion(packageName, getNextVersion(repository, date));
|
||||
}
|
||||
|
||||
export const amendMatrixForNext = (matrix: GithubActionsMatrix, repository: Repository = "https://upstream-mirror.mage-os.org", date: Date = new Date()): GithubActionsMatrix => {
|
||||
matrix.magento = matrix.magento.map((item) => item === nextVersionPlaceHolder ? computeNextPackage(nextVersionPlaceHolder, repository, date) : item);
|
||||
matrix.include = matrix.include.map((item) => {
|
||||
return item.magento === nextVersionPlaceHolder
|
||||
? {
|
||||
...item,
|
||||
magento: computeNextPackage(nextVersionPlaceHolder, repository, date),
|
||||
}
|
||||
: item;
|
||||
});
|
||||
return matrix;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
const KNOWN_REPOSITORIES = {
|
||||
"https://repo.mage-os.org": true,
|
||||
"https://nightly.mage-os.org": true,
|
||||
"https://upstream-mirror.mage-os.org": true,
|
||||
"https://upstream-nightly.mage-os.org": true,
|
||||
"https://repo.magento.com": true,
|
||||
}
|
||||
|
||||
export type Repository = keyof typeof KNOWN_REPOSITORIES;
|
||||
@@ -0,0 +1,32 @@
|
||||
import { unifyNextPackageName } from "./unify-next-package-name";
|
||||
|
||||
describe('unifyNextPackageName', () => {
|
||||
it('should do nothing to an unknown package', () => {
|
||||
expect(unifyNextPackageName('test', 'https://repo.mage-os.org', new Date())).toEqual('test');
|
||||
});
|
||||
|
||||
it('should do nothing to a next-available package at a non-next version', () => {
|
||||
expect(
|
||||
unifyNextPackageName('magento/product-community-edition:v2.4.5-p1', 'https://repo.mage-os.org', new Date())
|
||||
)
|
||||
.toEqual('magento/product-community-edition:v2.4.5-p1');
|
||||
});
|
||||
|
||||
it('should do nothing to a next package at a next version on a repo that doesnt support that version', () => {
|
||||
expect(
|
||||
unifyNextPackageName('magento/product-community-edition:next', 'https://repo.mage-os.org', new Date())
|
||||
).toEqual('magento/product-community-edition:next');
|
||||
});
|
||||
|
||||
it('should convert the next version to the specific format of the repo that supports the next version', () => {
|
||||
expect(
|
||||
unifyNextPackageName('magento/product-community-edition:next', 'https://upstream-nightly.mage-os.org', new Date())
|
||||
).toEqual('magento/product-community-edition:@alpha');
|
||||
});
|
||||
|
||||
it('should convert the next version to the specific format of the repo that supports the next version', () => {
|
||||
expect(
|
||||
unifyNextPackageName('mage-os/product-community-edition:next', 'https://nightly.mage-os.org', new Date())
|
||||
).toEqual('mage-os/product-community-edition:@alpha');
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,19 @@
|
||||
import { getNextVersion } from "./get-next-version";
|
||||
import { Repository } from "./repository";
|
||||
|
||||
/**
|
||||
* Unify the next package name for the "nightly" version of a given repository and package name.
|
||||
*
|
||||
* Internally, we call this "next".
|
||||
* - MageOS calls this "alpha".
|
||||
* - Adobe calls this "beta".
|
||||
*
|
||||
* Someone else may call it something else. This may even differ per package repository
|
||||
* (Packagist vs. MageOS Mirror vs. Some other mirror).
|
||||
*
|
||||
* If the version isn't a "next" version, unifyNextPackageName will ignore it
|
||||
* and return the original package name.
|
||||
*/
|
||||
export const unifyNextPackageName = (packageName: string, repository: Repository, date: Date): string => {
|
||||
return packageName.replace(/(?!:)next$/, getNextVersion(repository, date));
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
* Acceptable arguments for version `project`
|
||||
*/
|
||||
export const KNOWN_PROJECTS = {
|
||||
"mage-os": true,
|
||||
"magento-open-source": true,
|
||||
}
|
||||
|
||||
export type Project = keyof typeof KNOWN_PROJECTS;
|
||||
@@ -0,0 +1,12 @@
|
||||
import { validateProject } from "./validate-projects";
|
||||
|
||||
describe('validateProject', () => {
|
||||
it('returns `true` if its a valid project', () => {
|
||||
expect(validateProject("magento-open-source")).toBe(true);
|
||||
expect(validateProject("mage-os")).toBe(true);
|
||||
});
|
||||
|
||||
it('throws a helpful exception if it is an invalid project', () => {
|
||||
expect(() => validateProject(<any>"quark")).toThrowError();
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,6 @@
|
||||
import { isKnownProject } from './validations/is-known-project';
|
||||
import { ProjectValidator } from "./validator";
|
||||
|
||||
export const validateProject: ProjectValidator = (project): boolean => {
|
||||
return isKnownProject(project)
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import {isKnownProject} from "./is-known-project";
|
||||
import {Project} from "../projects";
|
||||
|
||||
describe('isKnownProject', () => {
|
||||
it('returns `true` for known projects', () => {
|
||||
expect(isKnownProject("mage-os")).toBe(true)
|
||||
expect(isKnownProject("magento-open-source")).toBe(true)
|
||||
});
|
||||
|
||||
it('throws a message if for unknown projects', () => {
|
||||
expect(() => isKnownProject(<Project>"bingo")).toThrowError()
|
||||
});
|
||||
})
|
||||
@@ -0,0 +1,11 @@
|
||||
import { KNOWN_PROJECTS, Project } from '../projects';
|
||||
|
||||
export const isKnownProject = (project: Project): boolean => {
|
||||
if (!(project in KNOWN_PROJECTS)) {
|
||||
throw new Error(
|
||||
`Invalid project provided, supported projects are: ${Object.keys(KNOWN_PROJECTS).join(', ')}`
|
||||
)
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
import { Project } from "./projects";
|
||||
|
||||
export type ProjectValidator = (project: Project) => boolean;
|
||||
@@ -0,0 +1,248 @@
|
||||
import { buildServicesForEntry } from './build-services';
|
||||
import { PackageMatrixVersion } from '../matrix/matrix-type';
|
||||
|
||||
const createTestEntry = (overrides: Partial<PackageMatrixVersion> = {}): PackageMatrixVersion => ({
|
||||
magento: 'magento/project-community-edition:2.4.7',
|
||||
php: '8.3',
|
||||
composer: '2.7.4',
|
||||
mysql: 'mysql:8.4',
|
||||
elasticsearch: 'elasticsearch:8.11.4',
|
||||
opensearch: 'opensearchproject/opensearch:2.19.1',
|
||||
rabbitmq: 'rabbitmq:4.0-management',
|
||||
redis: 'redis:7.2',
|
||||
varnish: 'varnish:7.5',
|
||||
valkey: 'valkey:8.0',
|
||||
nginx: 'nginx:1.26',
|
||||
os: 'ubuntu-latest',
|
||||
release: '2024-04-09T00:00:00+0000',
|
||||
eol: '2027-04-09T00:00:00+0000',
|
||||
...overrides
|
||||
});
|
||||
|
||||
describe('buildServicesForEntry', () => {
|
||||
describe('search engine selection', () => {
|
||||
it('should prefer opensearch when both are available', () => {
|
||||
const entry = createTestEntry();
|
||||
const services = buildServicesForEntry(entry);
|
||||
|
||||
expect(services.opensearch).toBeDefined();
|
||||
expect(services.opensearch.image).toBe('opensearchproject/opensearch:2.19.1');
|
||||
expect(services.elasticsearch).toBeUndefined();
|
||||
});
|
||||
|
||||
it('should fall back to elasticsearch when opensearch is empty', () => {
|
||||
const entry = createTestEntry({ opensearch: '' });
|
||||
const services = buildServicesForEntry(entry);
|
||||
|
||||
expect(services.elasticsearch).toBeDefined();
|
||||
expect(services.elasticsearch.image).toBe('elasticsearch:8.11.4');
|
||||
expect(services.opensearch).toBeUndefined();
|
||||
});
|
||||
|
||||
it('should not include search engine when neither is available', () => {
|
||||
const entry = createTestEntry({ opensearch: '', elasticsearch: '' });
|
||||
const services = buildServicesForEntry(entry);
|
||||
|
||||
expect(services.opensearch).toBeUndefined();
|
||||
expect(services.elasticsearch).toBeUndefined();
|
||||
});
|
||||
});
|
||||
|
||||
describe('cache selection', () => {
|
||||
it('should prefer valkey when both are available', () => {
|
||||
const entry = createTestEntry();
|
||||
const services = buildServicesForEntry(entry);
|
||||
|
||||
expect(services.valkey).toBeDefined();
|
||||
expect(services.valkey.image).toBe('valkey:8.0');
|
||||
expect(services.redis).toBeUndefined();
|
||||
});
|
||||
|
||||
it('should fall back to redis when valkey is empty', () => {
|
||||
const entry = createTestEntry({ valkey: '' });
|
||||
const services = buildServicesForEntry(entry);
|
||||
|
||||
expect(services.redis).toBeDefined();
|
||||
expect(services.redis.image).toBe('redis:7.2');
|
||||
expect(services.valkey).toBeUndefined();
|
||||
});
|
||||
|
||||
it('should not include cache when neither is available', () => {
|
||||
const entry = createTestEntry({ valkey: '', redis: '' });
|
||||
const services = buildServicesForEntry(entry);
|
||||
|
||||
expect(services.valkey).toBeUndefined();
|
||||
expect(services.redis).toBeUndefined();
|
||||
});
|
||||
});
|
||||
|
||||
describe('mysql configuration', () => {
|
||||
it('should include mysql when available', () => {
|
||||
const entry = createTestEntry();
|
||||
const services = buildServicesForEntry(entry);
|
||||
|
||||
expect(services.mysql).toBeDefined();
|
||||
expect(services.mysql.image).toBe('mysql:8.4');
|
||||
});
|
||||
|
||||
it('should not include mysql when empty', () => {
|
||||
const entry = createTestEntry({ mysql: '' });
|
||||
const services = buildServicesForEntry(entry);
|
||||
|
||||
expect(services.mysql).toBeUndefined();
|
||||
});
|
||||
|
||||
it('should include correct mysql env configuration', () => {
|
||||
const entry = createTestEntry();
|
||||
const services = buildServicesForEntry(entry);
|
||||
|
||||
expect(services.mysql.env).toEqual({
|
||||
MYSQL_DATABASE: 'magento_integration_tests',
|
||||
MYSQL_USER: 'user',
|
||||
MYSQL_PASSWORD: 'password',
|
||||
MYSQL_ROOT_PASSWORD: 'rootpassword'
|
||||
});
|
||||
});
|
||||
|
||||
it('should include correct mysql ports', () => {
|
||||
const entry = createTestEntry();
|
||||
const services = buildServicesForEntry(entry);
|
||||
|
||||
expect(services.mysql.ports).toEqual(['3306:3306']);
|
||||
});
|
||||
|
||||
it('should include mysql health check options', () => {
|
||||
const entry = createTestEntry();
|
||||
const services = buildServicesForEntry(entry);
|
||||
|
||||
expect(services.mysql.options).toContain('--health-cmd');
|
||||
expect(services.mysql.options).toContain('mysqladmin ping');
|
||||
});
|
||||
});
|
||||
|
||||
describe('rabbitmq configuration', () => {
|
||||
it('should include rabbitmq when available', () => {
|
||||
const entry = createTestEntry();
|
||||
const services = buildServicesForEntry(entry);
|
||||
|
||||
expect(services.rabbitmq).toBeDefined();
|
||||
expect(services.rabbitmq.image).toBe('rabbitmq:4.0-management');
|
||||
});
|
||||
|
||||
it('should not include rabbitmq when empty', () => {
|
||||
const entry = createTestEntry({ rabbitmq: '' });
|
||||
const services = buildServicesForEntry(entry);
|
||||
|
||||
expect(services.rabbitmq).toBeUndefined();
|
||||
});
|
||||
|
||||
it('should include correct rabbitmq env configuration', () => {
|
||||
const entry = createTestEntry();
|
||||
const services = buildServicesForEntry(entry);
|
||||
|
||||
expect(services.rabbitmq.env).toEqual({
|
||||
RABBITMQ_DEFAULT_USER: 'guest',
|
||||
RABBITMQ_DEFAULT_PASS: 'guest'
|
||||
});
|
||||
});
|
||||
|
||||
it('should include correct rabbitmq ports', () => {
|
||||
const entry = createTestEntry();
|
||||
const services = buildServicesForEntry(entry);
|
||||
|
||||
expect(services.rabbitmq.ports).toEqual(['5672:5672']);
|
||||
});
|
||||
});
|
||||
|
||||
describe('opensearch configuration', () => {
|
||||
it('should include correct opensearch env configuration', () => {
|
||||
const entry = createTestEntry();
|
||||
const services = buildServicesForEntry(entry);
|
||||
|
||||
expect(services.opensearch.env).toEqual({
|
||||
'discovery.type': 'single-node',
|
||||
'DISABLE_INSTALL_DEMO_CONFIG': 'true',
|
||||
'DISABLE_SECURITY_PLUGIN': 'true'
|
||||
});
|
||||
});
|
||||
|
||||
it('should include correct opensearch ports', () => {
|
||||
const entry = createTestEntry();
|
||||
const services = buildServicesForEntry(entry);
|
||||
|
||||
expect(services.opensearch.ports).toEqual(['9200:9200']);
|
||||
});
|
||||
|
||||
it('should include opensearch health check options', () => {
|
||||
const entry = createTestEntry();
|
||||
const services = buildServicesForEntry(entry);
|
||||
|
||||
expect(services.opensearch.options).toContain('--health-cmd');
|
||||
expect(services.opensearch.options).toContain('curl');
|
||||
});
|
||||
});
|
||||
|
||||
describe('elasticsearch configuration', () => {
|
||||
it('should include correct elasticsearch env configuration', () => {
|
||||
const entry = createTestEntry({ opensearch: '' });
|
||||
const services = buildServicesForEntry(entry);
|
||||
|
||||
expect(services.elasticsearch.env).toEqual({
|
||||
'discovery.type': 'single-node',
|
||||
'xpack.security.enabled': 'false',
|
||||
'xpack.security.http.ssl.enabled': 'false',
|
||||
'xpack.security.transport.ssl.enabled': 'false'
|
||||
});
|
||||
});
|
||||
|
||||
it('should include correct elasticsearch ports', () => {
|
||||
const entry = createTestEntry({ opensearch: '' });
|
||||
const services = buildServicesForEntry(entry);
|
||||
|
||||
expect(services.elasticsearch.ports).toEqual(['9200:9200']);
|
||||
});
|
||||
});
|
||||
|
||||
describe('cache configuration', () => {
|
||||
it('should include correct valkey ports', () => {
|
||||
const entry = createTestEntry();
|
||||
const services = buildServicesForEntry(entry);
|
||||
|
||||
expect(services.valkey.ports).toEqual(['6379:6379']);
|
||||
});
|
||||
|
||||
it('should include correct redis ports', () => {
|
||||
const entry = createTestEntry({ valkey: '' });
|
||||
const services = buildServicesForEntry(entry);
|
||||
|
||||
expect(services.redis.ports).toEqual(['6379:6379']);
|
||||
});
|
||||
});
|
||||
|
||||
describe('complete service output', () => {
|
||||
it('should build all services when all are available', () => {
|
||||
const entry = createTestEntry();
|
||||
const services = buildServicesForEntry(entry);
|
||||
|
||||
expect(Object.keys(services)).toHaveLength(4);
|
||||
expect(services.mysql).toBeDefined();
|
||||
expect(services.opensearch).toBeDefined();
|
||||
expect(services.rabbitmq).toBeDefined();
|
||||
expect(services.valkey).toBeDefined();
|
||||
});
|
||||
|
||||
it('should handle entry with minimal services', () => {
|
||||
const entry = createTestEntry({
|
||||
mysql: '',
|
||||
elasticsearch: '',
|
||||
opensearch: '',
|
||||
rabbitmq: '',
|
||||
redis: '',
|
||||
valkey: ''
|
||||
});
|
||||
const services = buildServicesForEntry(entry);
|
||||
|
||||
expect(Object.keys(services)).toHaveLength(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,86 @@
|
||||
import { PackageMatrixVersion, Services } from '../matrix/matrix-type';
|
||||
import {
|
||||
mysqlConfig,
|
||||
elasticsearchConfig,
|
||||
opensearchConfig,
|
||||
rabbitmqConfig,
|
||||
redisConfig,
|
||||
valkeyConfig
|
||||
} from './service-config';
|
||||
|
||||
interface SearchEngineChoice {
|
||||
type: 'opensearch' | 'elasticsearch';
|
||||
image: string;
|
||||
}
|
||||
|
||||
interface CacheChoice {
|
||||
type: 'valkey' | 'redis';
|
||||
image: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines which search engine to use for a matrix entry.
|
||||
* Prefers opensearch over elasticsearch.
|
||||
*/
|
||||
function getSearchEngineChoice(entry: PackageMatrixVersion): SearchEngineChoice | null {
|
||||
if (entry.opensearch && entry.opensearch.trim() !== '') {
|
||||
return { type: 'opensearch', image: entry.opensearch };
|
||||
}
|
||||
if (entry.elasticsearch && entry.elasticsearch.trim() !== '') {
|
||||
return { type: 'elasticsearch', image: entry.elasticsearch };
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines which cache to use for a matrix entry.
|
||||
* Prefers valkey over redis.
|
||||
*/
|
||||
function getCacheChoice(entry: PackageMatrixVersion): CacheChoice | null {
|
||||
if (entry.valkey && entry.valkey.trim() !== '') {
|
||||
return { type: 'valkey', image: entry.valkey };
|
||||
}
|
||||
if (entry.redis && entry.redis.trim() !== '') {
|
||||
return { type: 'redis', image: entry.redis };
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds the services object for a single matrix entry.
|
||||
*/
|
||||
export function buildServicesForEntry(entry: PackageMatrixVersion): Services {
|
||||
const services: Services = {};
|
||||
|
||||
// MySQL is always included if present
|
||||
if (entry.mysql && entry.mysql.trim() !== '') {
|
||||
services.mysql = mysqlConfig.getConfig(entry.mysql);
|
||||
}
|
||||
|
||||
// Search engine: prefer opensearch over elasticsearch
|
||||
const searchEngine = getSearchEngineChoice(entry);
|
||||
if (searchEngine) {
|
||||
if (searchEngine.type === 'opensearch') {
|
||||
services.opensearch = opensearchConfig.getConfig(searchEngine.image);
|
||||
} else {
|
||||
services.elasticsearch = elasticsearchConfig.getConfig(searchEngine.image);
|
||||
}
|
||||
}
|
||||
|
||||
// RabbitMQ
|
||||
if (entry.rabbitmq && entry.rabbitmq.trim() !== '') {
|
||||
services.rabbitmq = rabbitmqConfig.getConfig(entry.rabbitmq);
|
||||
}
|
||||
|
||||
// Cache: prefer valkey over redis
|
||||
const cache = getCacheChoice(entry);
|
||||
if (cache) {
|
||||
if (cache.type === 'valkey') {
|
||||
services.valkey = valkeyConfig.getConfig(cache.image);
|
||||
} else {
|
||||
services.redis = redisConfig.getConfig(cache.image);
|
||||
}
|
||||
}
|
||||
|
||||
return services;
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
import { ServiceConfig } from '../matrix/matrix-type';
|
||||
|
||||
export interface ServiceTemplate {
|
||||
getConfig(image: string): ServiceConfig;
|
||||
}
|
||||
|
||||
export const mysqlConfig: ServiceTemplate = {
|
||||
getConfig(image: string): ServiceConfig {
|
||||
return {
|
||||
image,
|
||||
env: {
|
||||
MYSQL_DATABASE: 'magento_integration_tests',
|
||||
MYSQL_USER: 'user',
|
||||
MYSQL_PASSWORD: 'password',
|
||||
MYSQL_ROOT_PASSWORD: 'rootpassword'
|
||||
},
|
||||
ports: ['3306:3306'],
|
||||
options: '--health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3'
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
export const elasticsearchConfig: ServiceTemplate = {
|
||||
getConfig(image: string): ServiceConfig {
|
||||
return {
|
||||
image,
|
||||
env: {
|
||||
'discovery.type': 'single-node',
|
||||
'xpack.security.enabled': 'false',
|
||||
'xpack.security.http.ssl.enabled': 'false',
|
||||
'xpack.security.transport.ssl.enabled': 'false'
|
||||
},
|
||||
ports: ['9200:9200'],
|
||||
options: '--health-cmd "curl http://localhost:9200/_cluster/health" --health-interval 10s --health-timeout 5s --health-retries 10'
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
export const opensearchConfig: ServiceTemplate = {
|
||||
getConfig(image: string): ServiceConfig {
|
||||
return {
|
||||
image,
|
||||
env: {
|
||||
'discovery.type': 'single-node',
|
||||
'DISABLE_INSTALL_DEMO_CONFIG': 'true',
|
||||
'DISABLE_SECURITY_PLUGIN': 'true'
|
||||
},
|
||||
ports: ['9200:9200'],
|
||||
options: '--health-cmd "curl http://localhost:9200/_cluster/health" --health-interval 10s --health-timeout 5s --health-retries 10'
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
export const rabbitmqConfig: ServiceTemplate = {
|
||||
getConfig(image: string): ServiceConfig {
|
||||
return {
|
||||
image,
|
||||
env: {
|
||||
RABBITMQ_DEFAULT_USER: 'guest',
|
||||
RABBITMQ_DEFAULT_PASS: 'guest'
|
||||
},
|
||||
ports: ['5672:5672']
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
export const redisConfig: ServiceTemplate = {
|
||||
getConfig(image: string): ServiceConfig {
|
||||
return {
|
||||
image,
|
||||
ports: ['6379:6379']
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
export const valkeyConfig: ServiceTemplate = {
|
||||
getConfig(image: string): ServiceConfig {
|
||||
return {
|
||||
image,
|
||||
ports: ['6379:6379']
|
||||
};
|
||||
}
|
||||
};
|
||||
@@ -1,110 +0,0 @@
|
||||
{
|
||||
"magento/project-community-edition:>=2.3 <2.4": {
|
||||
"magento": "magento/project-community-edition:>=2.3 <2.4",
|
||||
"php": 7.4,
|
||||
"composer": 1,
|
||||
"mysql": "mysql:5.7.30",
|
||||
"elasticsearch": "elasticsearch:7.16.3",
|
||||
"rabbitmq": "rabbitmq:3.8",
|
||||
"redis": "redis:6.0",
|
||||
"varnish": "varnish:6.0",
|
||||
"nginx": "nginx:1.18",
|
||||
"os": "ubuntu-18.04"
|
||||
},
|
||||
"magento/project-community-edition:>=2.4.0 <2.4.1": {
|
||||
"magento": "magento/project-community-edition:>=2.4.0 <2.4.1",
|
||||
"php": 7.4,
|
||||
"composer": 1,
|
||||
"mysql": "mysql:5.7.30",
|
||||
"elasticsearch": "elasticsearch:7.6.2",
|
||||
"rabbitmq": "rabbitmq:3.8",
|
||||
"redis": "redis:5.0",
|
||||
"varnish": "varnish:6.0",
|
||||
"nginx": "nginx:1.18",
|
||||
"os": "ubuntu-latest"
|
||||
},
|
||||
"magento/project-community-edition:>=2.4.1 <2.4.2": {
|
||||
"magento": "magento/project-community-edition:>=2.4.1 <2.4.2",
|
||||
"php": 7.4,
|
||||
"composer": 1,
|
||||
"mysql": "mysql:8.0.20",
|
||||
"elasticsearch": "elasticsearch:7.7.1",
|
||||
"rabbitmq": "rabbitmq:3.8",
|
||||
"redis": "redis:5.0",
|
||||
"varnish": "varnish:6.0",
|
||||
"nginx": "nginx:1.18",
|
||||
"os": "ubuntu-latest"
|
||||
},
|
||||
"magento/project-community-edition:>=2.4.2 <2.4.3": {
|
||||
"magento": "magento/project-community-edition:>=2.4.2 <2.4.3",
|
||||
"php": 7.4,
|
||||
"composer": 2,
|
||||
"mysql": "mysql:8.0",
|
||||
"elasticsearch": "elasticsearch:7.9.3",
|
||||
"rabbitmq": "rabbitmq:3.8",
|
||||
"redis": "redis:6.0",
|
||||
"varnish": "varnish:6.0",
|
||||
"nginx": "nginx:1.18",
|
||||
"os": "ubuntu-latest"
|
||||
},
|
||||
"magento/project-community-edition:>=2.4.3 <2.4.4": {
|
||||
"magento": "magento/project-community-edition:>=2.4.3 <2.4.4",
|
||||
"php": 7.4,
|
||||
"composer": 2,
|
||||
"mysql": "mysql:8.0",
|
||||
"elasticsearch": "elasticsearch:7.16.3",
|
||||
"rabbitmq": "rabbitmq:3.8",
|
||||
"redis": "redis:6.0",
|
||||
"varnish": "varnish:6.0",
|
||||
"nginx": "nginx:1.18",
|
||||
"os": "ubuntu-latest"
|
||||
},
|
||||
"magento/project-community-edition:>=2.4.4 <2.4.5": {
|
||||
"magento": "magento/project-community-edition:>=2.4.4 <2.4.5",
|
||||
"php": 8.1,
|
||||
"composer": 2,
|
||||
"mysql": "mysql:8.0",
|
||||
"elasticsearch": "elasticsearch:7.16.3",
|
||||
"rabbitmq": "rabbitmq:3.9",
|
||||
"redis": "redis:6.2",
|
||||
"varnish": "varnish:7.0",
|
||||
"nginx": "nginx:1.18",
|
||||
"os": "ubuntu-latest"
|
||||
},
|
||||
"magento/project-community-edition:>=2.4.5 <2.4.6": {
|
||||
"magento": "magento/project-community-edition:>=2.4.5 <2.4.6",
|
||||
"php": 8.1,
|
||||
"composer": 2,
|
||||
"mysql": "mysql:8.0",
|
||||
"elasticsearch": "elasticsearch:7.17.5",
|
||||
"rabbitmq": "rabbitmq:3.9",
|
||||
"redis": "redis:6.2",
|
||||
"varnish": "varnish:7.0",
|
||||
"nginx": "nginx:1.18",
|
||||
"os": "ubuntu-latest"
|
||||
},
|
||||
"magento/project-community-edition": {
|
||||
"magento": "magento/project-community-edition",
|
||||
"php": 8.1,
|
||||
"composer": 2,
|
||||
"mysql": "mysql:8.0",
|
||||
"elasticsearch": "elasticsearch:7.17.5",
|
||||
"rabbitmq": "rabbitmq:3.9",
|
||||
"redis": "redis:6.2",
|
||||
"varnish": "varnish:7.0",
|
||||
"nginx": "nginx:1.18",
|
||||
"os": "ubuntu-latest"
|
||||
},
|
||||
"magento/project-community-edition:next": {
|
||||
"magento": "magento/project-community-edition:next",
|
||||
"php": 8.1,
|
||||
"composer": 2,
|
||||
"mysql": "mysql:8.0",
|
||||
"elasticsearch": "elasticsearch:7.17.5",
|
||||
"rabbitmq": "rabbitmq:3.9",
|
||||
"redis": "redis:6.2",
|
||||
"varnish": "varnish:7.0",
|
||||
"nginx": "nginx:1.18",
|
||||
"os": "ubuntu-latest"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import { getIndividualVersionsForProject, getCompositeVersionsForProject } from "./get-versions-for-project";
|
||||
import {Project} from "../project/projects";
|
||||
|
||||
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)
|
||||
})
|
||||
|
||||
it('throws error if no individual versions are specified for given project', () => {
|
||||
expect(() => getIndividualVersionsForProject(<Project>"ahsoka")).toThrowError()
|
||||
})
|
||||
})
|
||||
|
||||
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)
|
||||
})
|
||||
|
||||
it('throws error if no composite versions are specified for given project', () => {
|
||||
expect(() => getCompositeVersionsForProject(<Project>"spock")).toThrowError()
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,34 @@
|
||||
import { validateProject } from "../project/validate-projects";
|
||||
import { PackageMatrixVersion } from "../matrix/matrix-type";
|
||||
|
||||
const individual = {
|
||||
'mage-os': require('./mage-os/individual.json'),
|
||||
'magento-open-source': require('./magento-open-source/individual.json')
|
||||
}
|
||||
|
||||
const composite = {
|
||||
'mage-os': require('./mage-os/composite.json'),
|
||||
'magento-open-source': require('./magento-open-source/composite.json')
|
||||
}
|
||||
|
||||
export const getIndividualVersionsForProject = (project: string): Record<string, PackageMatrixVersion> => {
|
||||
validateProject(<any>project)
|
||||
if (individual[project] === undefined) {
|
||||
throw new Error(
|
||||
`Project "${project}" has no individual version specifications`
|
||||
)
|
||||
}
|
||||
|
||||
return individual[project]
|
||||
}
|
||||
|
||||
export const getCompositeVersionsForProject = (project: string): Record<string, PackageMatrixVersion> => {
|
||||
validateProject(<any>project)
|
||||
if (composite[project] === undefined) {
|
||||
throw new Error(
|
||||
`Project "${project}" has no composite version specifications`
|
||||
)
|
||||
}
|
||||
|
||||
return composite[project]
|
||||
}
|
||||
@@ -1,218 +0,0 @@
|
||||
{
|
||||
"magento/project-community-edition:2.3.7-p3": {
|
||||
"magento": "magento/project-community-edition:2.3.7-p3",
|
||||
"php": 7.4,
|
||||
"composer": 1,
|
||||
"mysql": "mysql:5.7.30",
|
||||
"elasticsearch": "elasticsearch:7.16.3",
|
||||
"rabbitmq": "rabbitmq:3.8",
|
||||
"redis": "redis:6.0",
|
||||
"varnish": "varnish:6.0",
|
||||
"nginx": "nginx:1.18",
|
||||
"os": "ubuntu-18.04"
|
||||
},
|
||||
"magento/project-community-edition:2.3.7-p4": {
|
||||
"magento": "magento/project-community-edition:2.3.7-p4",
|
||||
"php": 7.4,
|
||||
"composer": 1,
|
||||
"mysql": "mysql:5.7.30",
|
||||
"elasticsearch": "elasticsearch:7.16.3",
|
||||
"rabbitmq": "rabbitmq:3.8",
|
||||
"redis": "redis:6.0",
|
||||
"varnish": "varnish:6.0",
|
||||
"nginx": "nginx:1.18",
|
||||
"os": "ubuntu-18.04"
|
||||
},
|
||||
"magento/project-community-edition:2.4.0": {
|
||||
"magento": "magento/project-community-edition:2.4.0",
|
||||
"php": 7.4,
|
||||
"composer": 1,
|
||||
"mysql": "mysql:5.7.30",
|
||||
"elasticsearch": "elasticsearch:7.6.2",
|
||||
"rabbitmq": "rabbitmq:3.8",
|
||||
"redis": "redis:5.0",
|
||||
"varnish": "varnish:6.0",
|
||||
"nginx": "nginx:1.18",
|
||||
"os": "ubuntu-latest"
|
||||
},
|
||||
"magento/project-community-edition:2.4.0-p1": {
|
||||
"magento": "magento/project-community-edition:2.4.0-p1",
|
||||
"php": 7.4,
|
||||
"composer": 1,
|
||||
"mysql": "mysql:5.7.30",
|
||||
"elasticsearch": "elasticsearch:7.6.2",
|
||||
"rabbitmq": "rabbitmq:3.8",
|
||||
"redis": "redis:5.0",
|
||||
"varnish": "varnish:6.0",
|
||||
"nginx": "nginx:1.18",
|
||||
"os": "ubuntu-latest"
|
||||
},
|
||||
"magento/project-community-edition:2.4.1": {
|
||||
"magento": "magento/project-community-edition:2.4.1",
|
||||
"php": 7.4,
|
||||
"composer": 1,
|
||||
"mysql": "mysql:8.0.20",
|
||||
"elasticsearch": "elasticsearch:7.7.1",
|
||||
"rabbitmq": "rabbitmq:3.8",
|
||||
"redis": "redis:5.0",
|
||||
"varnish": "varnish:6.0",
|
||||
"nginx": "nginx:1.18",
|
||||
"os": "ubuntu-latest"
|
||||
},
|
||||
"magento/project-community-edition:2.4.1-p1": {
|
||||
"magento": "magento/project-community-edition:2.4.1-p1",
|
||||
"php": 7.4,
|
||||
"composer": 1,
|
||||
"mysql": "mysql:8.0.20",
|
||||
"elasticsearch": "elasticsearch:7.7.1",
|
||||
"rabbitmq": "rabbitmq:3.8",
|
||||
"redis": "redis:5.0",
|
||||
"varnish": "varnish:6.0",
|
||||
"nginx": "nginx:1.18",
|
||||
"os": "ubuntu-latest"
|
||||
},
|
||||
"magento/project-community-edition:2.4.2": {
|
||||
"magento": "magento/project-community-edition:2.4.2",
|
||||
"php": 7.4,
|
||||
"composer": 2,
|
||||
"mysql": "mysql:8.0",
|
||||
"elasticsearch": "elasticsearch:7.9.3",
|
||||
"rabbitmq": "rabbitmq:3.8",
|
||||
"redis": "redis:6.0",
|
||||
"varnish": "varnish:6.0",
|
||||
"nginx": "nginx:1.18",
|
||||
"os": "ubuntu-latest"
|
||||
},
|
||||
"magento/project-community-edition:2.4.2-p1": {
|
||||
"magento": "magento/project-community-edition:2.4.2-p1",
|
||||
"php": 7.4,
|
||||
"composer": 2,
|
||||
"mysql": "mysql:8.0",
|
||||
"elasticsearch": "elasticsearch:7.9.3",
|
||||
"rabbitmq": "rabbitmq:3.8",
|
||||
"redis": "redis:6.0",
|
||||
"varnish": "varnish:6.0",
|
||||
"nginx": "nginx:1.18",
|
||||
"os": "ubuntu-latest"
|
||||
},
|
||||
"magento/project-community-edition:2.4.2-p2": {
|
||||
"magento": "magento/project-community-edition:2.4.2-p2",
|
||||
"php": 7.4,
|
||||
"composer": 2,
|
||||
"mysql": "mysql:8.0",
|
||||
"elasticsearch": "elasticsearch:7.9.3",
|
||||
"rabbitmq": "rabbitmq:3.8",
|
||||
"redis": "redis:6.0",
|
||||
"varnish": "varnish:6.0",
|
||||
"nginx": "nginx:1.18",
|
||||
"os": "ubuntu-latest"
|
||||
},
|
||||
"magento/project-community-edition:2.4.3": {
|
||||
"magento": "magento/project-community-edition:2.4.3",
|
||||
"php": 7.4,
|
||||
"composer": 2,
|
||||
"mysql": "mysql:8.0",
|
||||
"elasticsearch": "elasticsearch:7.16.3",
|
||||
"rabbitmq": "rabbitmq:3.8",
|
||||
"redis": "redis:6.0",
|
||||
"varnish": "varnish:6.0",
|
||||
"nginx": "nginx:1.18",
|
||||
"os": "ubuntu-latest"
|
||||
},
|
||||
"magento/project-community-edition:2.4.3-p1": {
|
||||
"magento": "magento/project-community-edition:2.4.3-p1",
|
||||
"php": 7.4,
|
||||
"composer": 2,
|
||||
"mysql": "mysql:8.0",
|
||||
"elasticsearch": "elasticsearch:7.16.3",
|
||||
"rabbitmq": "rabbitmq:3.8",
|
||||
"redis": "redis:6.0",
|
||||
"varnish": "varnish:6.0",
|
||||
"nginx": "nginx:1.18",
|
||||
"os": "ubuntu-latest"
|
||||
},
|
||||
"magento/project-community-edition:2.4.3-p2": {
|
||||
"magento": "magento/project-community-edition:2.4.3-p2",
|
||||
"php": 7.4,
|
||||
"composer": 2,
|
||||
"mysql": "mysql:8.0",
|
||||
"elasticsearch": "elasticsearch:7.16.3",
|
||||
"rabbitmq": "rabbitmq:3.8",
|
||||
"redis": "redis:6.0",
|
||||
"varnish": "varnish:6.0",
|
||||
"nginx": "nginx:1.18",
|
||||
"os": "ubuntu-latest"
|
||||
},
|
||||
"magento/project-community-edition:2.4.3-p3": {
|
||||
"magento": "magento/project-community-edition:2.4.3-p3",
|
||||
"php": 7.4,
|
||||
"composer": 2,
|
||||
"mysql": "mysql:8.0",
|
||||
"elasticsearch": "elasticsearch:7.16.3",
|
||||
"rabbitmq": "rabbitmq:3.8",
|
||||
"redis": "redis:6.0",
|
||||
"varnish": "varnish:6.0",
|
||||
"nginx": "nginx:1.18",
|
||||
"os": "ubuntu-latest"
|
||||
},
|
||||
"magento/project-community-edition:2.4.4": {
|
||||
"magento": "magento/project-community-edition:2.4.4",
|
||||
"php": 8.1,
|
||||
"composer": 2,
|
||||
"mysql": "mysql:8.0",
|
||||
"elasticsearch": "elasticsearch:7.16.3",
|
||||
"rabbitmq": "rabbitmq:3.9",
|
||||
"redis": "redis:6.2",
|
||||
"varnish": "varnish:7.0",
|
||||
"nginx": "nginx:1.18",
|
||||
"os": "ubuntu-latest"
|
||||
},
|
||||
"magento/project-community-edition:2.4.4-p1": {
|
||||
"magento": "magento/project-community-edition:2.4.4-p1",
|
||||
"php": 8.1,
|
||||
"composer": 2,
|
||||
"mysql": "mysql:8.0",
|
||||
"elasticsearch": "elasticsearch:7.16.3",
|
||||
"rabbitmq": "rabbitmq:3.9",
|
||||
"redis": "redis:6.2",
|
||||
"varnish": "varnish:7.0",
|
||||
"nginx": "nginx:1.18",
|
||||
"os": "ubuntu-latest"
|
||||
},
|
||||
"magento/project-community-edition:2.4.4-p2": {
|
||||
"magento": "magento/project-community-edition:2.4.4-p2",
|
||||
"php": 8.1,
|
||||
"composer": 2,
|
||||
"mysql": "mysql:8.0",
|
||||
"elasticsearch": "elasticsearch:7.16.3",
|
||||
"rabbitmq": "rabbitmq:3.9",
|
||||
"redis": "redis:6.2",
|
||||
"varnish": "varnish:7.0",
|
||||
"nginx": "nginx:1.18",
|
||||
"os": "ubuntu-latest"
|
||||
},
|
||||
"magento/project-community-edition:2.4.5": {
|
||||
"magento": "magento/project-community-edition:2.4.5",
|
||||
"php": 8.1,
|
||||
"composer": 2,
|
||||
"mysql": "mysql:8.0",
|
||||
"elasticsearch": "elasticsearch:7.17.5",
|
||||
"rabbitmq": "rabbitmq:3.9",
|
||||
"redis": "redis:6.2",
|
||||
"varnish": "varnish:7.0",
|
||||
"nginx": "nginx:1.18",
|
||||
"os": "ubuntu-latest"
|
||||
},
|
||||
"magento/project-community-edition:2.4.5-p1": {
|
||||
"magento": "magento/project-community-edition:2.4.5-p1",
|
||||
"php": 8.1,
|
||||
"composer": 2,
|
||||
"mysql": "mysql:8.0",
|
||||
"elasticsearch": "elasticsearch:7.17.5",
|
||||
"rabbitmq": "rabbitmq:3.9",
|
||||
"redis": "redis:6.2",
|
||||
"varnish": "varnish:7.0",
|
||||
"nginx": "nginx:1.18",
|
||||
"os": "ubuntu-latest"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
{
|
||||
"mage-os/project-community-edition": {
|
||||
"magento": "mage-os/project-community-edition",
|
||||
"php": 8.4,
|
||||
"composer": "2.9.5",
|
||||
"mysql": "mysql:8.4",
|
||||
"opensearch": "opensearchproject/opensearch:3",
|
||||
"rabbitmq": "rabbitmq:4.1-management",
|
||||
"valkey": "valkey/valkey:8.0",
|
||||
"varnish": "varnish:7.7",
|
||||
"nginx": "nginx:1.28",
|
||||
"os": "ubuntu-latest",
|
||||
"release": "2026-03-10T00:00:00+0000",
|
||||
"eol": "2029-03-10T00:00:00+0000"
|
||||
},
|
||||
"mage-os/project-community-edition:next": {
|
||||
"magento": "mage-os/project-community-edition:next",
|
||||
"php": 8.4,
|
||||
"composer": "2.9.5",
|
||||
"mysql": "mysql:8.4",
|
||||
"opensearch": "opensearchproject/opensearch:3",
|
||||
"rabbitmq": "rabbitmq:4.1-management",
|
||||
"valkey": "valkey/valkey:8.0",
|
||||
"varnish": "varnish:7.7",
|
||||
"nginx": "nginx:1.28",
|
||||
"os": "ubuntu-latest",
|
||||
"release": "2026-03-10T00:00:00+0000",
|
||||
"eol": "2029-03-10T00:00:00+0000"
|
||||
},
|
||||
"mage-os/project-community-edition:>=1.0 <1.1": {
|
||||
"magento": "mage-os/project-community-edition:>=1.0 <1.1",
|
||||
"php": 8.3,
|
||||
"composer": "2.9.5",
|
||||
"mysql": "mariadb:10.6",
|
||||
"elasticsearch": "elasticsearch:8.11.4",
|
||||
"rabbitmq": "rabbitmq:3.13-management",
|
||||
"redis": "redis:7.2",
|
||||
"varnish": "varnish:7.5",
|
||||
"nginx": "nginx:1.26",
|
||||
"os": "ubuntu-latest",
|
||||
"release": "2023-10-10T00:00:00+0000",
|
||||
"eol": "2025-04-07T00:00:00+0000"
|
||||
},
|
||||
"mage-os/project-community-edition:>=1.1 <1.2": {
|
||||
"magento": "mage-os/project-community-edition:>=1.1 <1.2",
|
||||
"php": 8.4,
|
||||
"composer": "2.9.5",
|
||||
"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": "2025-04-15T00:00:00+0000",
|
||||
"eol": "2025-06-16T00:00:00+0000"
|
||||
},
|
||||
"mage-os/project-community-edition:>=1.2 <1.3": {
|
||||
"magento": "mage-os/project-community-edition:>=1.2 <1.3",
|
||||
"php": 8.4,
|
||||
"composer": "2.9.5",
|
||||
"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": "2025-06-17T00:00:00+0000",
|
||||
"eol": "2025-08-12T00:00:00+0000"
|
||||
},
|
||||
"mage-os/project-community-edition:>=1.3 <1.4": {
|
||||
"magento": "mage-os/project-community-edition:>=1.2 <1.3",
|
||||
"php": 8.4,
|
||||
"composer": "2.9.5",
|
||||
"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": "2025-08-13T00:00:00+0000",
|
||||
"eol": "2025-10-16T00:00:00+0000"
|
||||
},
|
||||
"mage-os/project-community-edition:>=2.0 <2.1": {
|
||||
"magento": "mage-os/project-community-edition:>=2.0 <2.1",
|
||||
"php": 8.4,
|
||||
"composer": "2.9.5",
|
||||
"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": "2025-10-16T00:00:00+0000",
|
||||
"eol": "2026-01-20T00:00:00+0000"
|
||||
},
|
||||
"mage-os/project-community-edition:>=2.1 <2.2": {
|
||||
"magento": "mage-os/project-community-edition:>=2.1 <2.2",
|
||||
"php": 8.4,
|
||||
"composer": "2.9.5",
|
||||
"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-01-20T00:00:00+0000",
|
||||
"eol": "2026-03-10T00:00:00+0000"
|
||||
},
|
||||
"mage-os/project-community-edition:>=2.2 <2.3": {
|
||||
"magento": "mage-os/project-community-edition:>=2.2 <2.3",
|
||||
"php": 8.4,
|
||||
"composer": "2.9.3",
|
||||
"mysql": "mysql:8.4",
|
||||
"opensearch": "opensearchproject/opensearch:3",
|
||||
"rabbitmq": "rabbitmq:4.1-management",
|
||||
"valkey": "valkey/valkey:8.0",
|
||||
"varnish": "varnish:7.7",
|
||||
"nginx": "nginx:1.28",
|
||||
"os": "ubuntu-latest",
|
||||
"release": "2026-03-10T00:00:00+0000",
|
||||
"eol": "2029-03-10T00:00:00+0000"
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user