mirror of
https://github.com/graycoreio/github-actions-magento2.git
synced 2026-06-13 13:14:53 +00:00
Compare commits
53 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6776e7f306 | |||
| c136c111d9 | |||
| d3b1ab6b34 | |||
| 1d9ad11e92 | |||
| 0f31e401b7 | |||
| e3f4c10c7b | |||
| dbc889f7ce | |||
| c0390c8abd | |||
| d43068a144 | |||
| 805b23b1fa | |||
| b0e1a0a943 | |||
| 725ba09bf5 | |||
| 9d6355d5e6 | |||
| 7b74ff7386 | |||
| f5d43a5184 | |||
| 856d2df481 | |||
| d8936216c0 | |||
| 84c16c2ad9 | |||
| fd858c3063 | |||
| 158bd0b0c8 | |||
| e4f0f85e38 | |||
| 5a993f2f7c | |||
| 95388ad52f | |||
| f1b0f27863 | |||
| fa67b79f29 | |||
| 7431dcb7af | |||
| 3e4d3c1645 | |||
| 8611b18aec | |||
| ab73d860bd | |||
| d4a481b099 | |||
| 2a102c253d | |||
| e8e2509a90 | |||
| 310d09be9f | |||
| b4e7831c93 | |||
| 1f0152f3bd | |||
| 4b9366fdf2 | |||
| 937a1a6fee | |||
| 71f1333110 | |||
| 7de0711ac2 | |||
| 5a96a2c350 | |||
| 5b22207580 | |||
| f609c0e88c | |||
| 8f9c0a135a | |||
| affb1ce1f9 | |||
| cbbba628dd | |||
| 841670a97f | |||
| 26c354d8d4 | |||
| 09d4f1e097 | |||
| 88de9ce113 | |||
| 671f47ff89 | |||
| 17c9b0e0c6 | |||
| 7980955b02 | |||
| 5f7bf95092 |
@@ -0,0 +1,6 @@
|
|||||||
|
module.exports = {
|
||||||
|
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
|
||||||
|
parser: '@typescript-eslint/parser',
|
||||||
|
plugins: ['@typescript-eslint'],
|
||||||
|
root: true,
|
||||||
|
};
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
# Maintain dependencies for GitHub Actions
|
||||||
|
- package-ecosystem: "github-actions"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
|
- package-ecosystem: "npm"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
name: Coding Standard
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths:
|
||||||
|
- "_test/demo-package/**"
|
||||||
|
- ".github/workflows/_internal-coding-standard.yaml"
|
||||||
|
- "coding-standard/**"
|
||||||
|
- "!(**/*.md)"
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths:
|
||||||
|
- "_test/demo-package/**"
|
||||||
|
- ".github/workflows/_internal-coding-standard.yaml"
|
||||||
|
- "coding-standard/**"
|
||||||
|
- "!(**/*.md)"
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
version:
|
||||||
|
type: string
|
||||||
|
default: '*'
|
||||||
|
description: The version of the coding standard to use.
|
||||||
|
required: false
|
||||||
|
path:
|
||||||
|
type: string
|
||||||
|
default: '_test/demo-package'
|
||||||
|
description: Path to run the coding standard on.
|
||||||
|
required: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
coding-standard:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: './coding-standard'
|
||||||
|
with:
|
||||||
|
version: ${{ github.event.inputs.version || '*' }}
|
||||||
|
path: ${{ github.event.inputs.path || '_test/demo-package' }}
|
||||||
@@ -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@v3
|
||||||
|
- 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
|
||||||
|
|
||||||
@@ -27,8 +27,10 @@ jobs:
|
|||||||
outputs:
|
outputs:
|
||||||
matrix: ${{ steps.supported-version.outputs.matrix }}
|
matrix: ${{ steps.supported-version.outputs.matrix }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: ./supported-version
|
- uses: ./supported-version
|
||||||
|
with:
|
||||||
|
kind: all
|
||||||
id: supported-version
|
id: supported-version
|
||||||
- run: echo ${{ steps.supported-version.outputs.matrix }}
|
- run: echo ${{ steps.supported-version.outputs.matrix }}
|
||||||
|
|
||||||
@@ -36,9 +38,10 @@ jobs:
|
|||||||
needs: compute_matrix
|
needs: compute_matrix
|
||||||
strategy:
|
strategy:
|
||||||
matrix: ${{ fromJSON(needs.compute_matrix.outputs.matrix) }}
|
matrix: ${{ fromJSON(needs.compute_matrix.outputs.matrix) }}
|
||||||
|
fail-fast: false
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: ./installation-test
|
- uses: ./installation-test
|
||||||
with:
|
with:
|
||||||
composer_version: ${{ matrix.composer }}
|
composer_version: ${{ matrix.composer }}
|
||||||
|
|||||||
@@ -27,8 +27,10 @@ jobs:
|
|||||||
outputs:
|
outputs:
|
||||||
matrix: ${{ steps.supported-version.outputs.matrix }}
|
matrix: ${{ steps.supported-version.outputs.matrix }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: ./supported-version
|
- uses: ./supported-version
|
||||||
|
with:
|
||||||
|
kind: all
|
||||||
id: supported-version
|
id: supported-version
|
||||||
- run: echo ${{ steps.supported-version.outputs.matrix }}
|
- run: echo ${{ steps.supported-version.outputs.matrix }}
|
||||||
integration-workflow:
|
integration-workflow:
|
||||||
@@ -39,3 +41,4 @@ jobs:
|
|||||||
source_folder: $GITHUB_WORKSPACE/_test/demo-package
|
source_folder: $GITHUB_WORKSPACE/_test/demo-package
|
||||||
matrix: ${{ needs.compute_matrix.outputs.matrix }}
|
matrix: ${{ needs.compute_matrix.outputs.matrix }}
|
||||||
test_command: ../../../vendor/bin/phpunit ../../../vendor/graycore/magento2-demo-package/Test/Integration
|
test_command: ../../../vendor/bin/phpunit ../../../vendor/graycore/magento2-demo-package/Test/Integration
|
||||||
|
fail-fast: false
|
||||||
|
|||||||
@@ -0,0 +1,127 @@
|
|||||||
|
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
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
compute_matrix:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
matrix: ${{ steps.supported-version.outputs.matrix }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- 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@v3
|
||||||
|
|
||||||
|
- 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@v3
|
||||||
|
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="https://mirror.mage-os.org" "${{ 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'
|
||||||
|
|
||||||
|
- 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'
|
||||||
|
|
||||||
|
- run: composer install
|
||||||
|
shell: bash
|
||||||
|
working-directory: "${{ env.PSEUDO_REPO_FOLDER }}"
|
||||||
|
if: steps.setup-magento-store-cache.outputs.cache-hit != 'true'
|
||||||
|
|
||||||
|
- 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 }}
|
||||||
|
|
||||||
|
- 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 }}
|
||||||
|
|
||||||
|
setup-magento-extension:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- uses: ./setup-magento
|
||||||
|
id: setup-magento
|
||||||
|
with:
|
||||||
|
php-version: 8.1
|
||||||
|
tools: composer:v2
|
||||||
|
mode: extension
|
||||||
|
magento_version: magento/project-community-edition:2.4.5-p1
|
||||||
|
|
||||||
|
- uses: graycoreio/github-actions-magento2/cache-magento@main
|
||||||
|
with:
|
||||||
|
mode: 'extension'
|
||||||
|
composer_cache_key: 'magento/project-community-edition:2.4.5-p1'
|
||||||
|
|
||||||
|
- run: composer install
|
||||||
|
name: Composer install
|
||||||
|
shell: bash
|
||||||
|
working-directory: ${{ steps.setup-magento.outputs.path }}
|
||||||
@@ -27,7 +27,7 @@ jobs:
|
|||||||
- 8.1
|
- 8.1
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: ./unit-test
|
- uses: ./unit-test
|
||||||
with:
|
with:
|
||||||
source_folder: _test/demo-package
|
source_folder: _test/demo-package
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- ".github/workflows/_internal-supported-version.yaml"
|
- ".github/workflows/_internal-supported-version.yaml"
|
||||||
- "supported-version/**"
|
- "supported-version/**"
|
||||||
|
- "package.json"
|
||||||
- "!(**/*.md)"
|
- "!(**/*.md)"
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
@@ -14,6 +15,7 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- ".github/workflows/_internal-supported-version.yaml"
|
- ".github/workflows/_internal-supported-version.yaml"
|
||||||
- "supported-version/**"
|
- "supported-version/**"
|
||||||
|
- "package.json"
|
||||||
- "!(**/*.md)"
|
- "!(**/*.md)"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|||||||
@@ -6,20 +6,21 @@ A Github Workflow that runs the Integration Tests of a Magento Package
|
|||||||
|
|
||||||
See the [integration.yaml](./integration.yaml)
|
See the [integration.yaml](./integration.yaml)
|
||||||
|
|
||||||
| Input | Description | Required | Default |
|
| 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) | 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 |
|
| 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 |
|
| package_name | The name of the package | true | NULL |
|
||||||
| source_folder | The source folder of the package | false | $GITHUB_WORKSPACE |
|
| source_folder | The source folder of the package | false | $GITHUB_WORKSPACE |
|
||||||
| magento_directory | The folder where Magento will be installed | false | ../magento2 |
|
| magento_directory | The folder where Magento will be installed | false | ../magento2 |
|
||||||
| magento_repository | Where to install Magento from | false | https://mirror.mage-os.org/ |
|
| magento_repository | Where to install Magento from | false | https://mirror.mage-os.org/ |
|
||||||
| test_command | The integration test command to run | false | "../../../vendor/bin/phpunit" |
|
| test_command | The integration test command to run | false | "../../../vendor/bin/phpunit" |
|
||||||
|
| composer_cache_key | A key to version the composer cache. Can be incremented if you need to bust the cache. | false | "" |
|
||||||
|
|
||||||
## Secrets
|
## Secrets
|
||||||
| Input | Description | Required | Default |
|
| 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
|
### Matrix Format
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
|
use_local_source:
|
||||||
|
type: boolean
|
||||||
|
required: false
|
||||||
|
default: true
|
||||||
|
description: "Whether or not you want to test your local package or not."
|
||||||
|
|
||||||
source_folder:
|
source_folder:
|
||||||
type: string
|
type: string
|
||||||
@@ -41,6 +46,12 @@ on:
|
|||||||
default: ../../../vendor/bin/phpunit
|
default: ../../../vendor/bin/phpunit
|
||||||
description: "The integration test command to run"
|
description: "The integration test command to run"
|
||||||
|
|
||||||
|
composer_cache_key:
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: ''
|
||||||
|
description: A key to version the composer cache. Can be incremented if you need to bust the cache.
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
composer_auth:
|
composer_auth:
|
||||||
required: false
|
required: false
|
||||||
@@ -97,27 +108,42 @@ jobs:
|
|||||||
COMPOSER_AUTH: ${{ secrets.composer_auth }}
|
COMPOSER_AUTH: ${{ secrets.composer_auth }}
|
||||||
name: Create Magento ${{ matrix.magento }} Project
|
name: Create Magento ${{ matrix.magento }} Project
|
||||||
|
|
||||||
|
- uses: graycoreio/github-actions-magento2/get-magento-version@main
|
||||||
|
id: magento-version
|
||||||
|
with:
|
||||||
|
working-directory: ${{ inputs.magento_directory }}
|
||||||
|
|
||||||
- name: Get Composer Cache Directory
|
- name: Get Composer Cache Directory
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: ${{ inputs.magento_directory }}
|
working-directory: ${{ inputs.magento_directory }}
|
||||||
id: composer-cache
|
id: composer-cache
|
||||||
run: |
|
run: |
|
||||||
echo "::set-output name=dir::$(composer config cache-files-dir)"
|
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
|
||||||
- name: "Cache Composer Packages"
|
- name: "Cache Composer Packages"
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
key: 'composer | v3 | "$(Agent.OS)" | composer.lock | ${{ matrix.composer }} | ${{ matrix.php }} | ${{ matrix.magento }}'
|
key: "composer | v5 | ${{ inputs.composer_cache_key }} | ${{ hashFiles('composer.lock') }} | ${{ matrix.os }} | ${{ matrix.composer }} | ${{ matrix.php }} | ${{ matrix.magento }}"
|
||||||
path: ${{ steps.composer-cache.outputs.dir }}
|
path: ${{ steps.composer-cache.outputs.dir }}
|
||||||
|
|
||||||
- run: composer config repositories.local path ${{ inputs.source_folder }}
|
- run: composer config repositories.local path ${{ inputs.source_folder }}
|
||||||
name: Add Github Repo for Testing
|
name: Add Github Repo for Testing
|
||||||
working-directory: ${{ inputs.magento_directory }}
|
working-directory: ${{ inputs.magento_directory }}
|
||||||
shell: bash
|
shell: bash
|
||||||
|
if: ${{ inputs.use_local_source == true }}
|
||||||
|
|
||||||
- run: composer require monolog/monolog:"<2.7.0" --no-update
|
- run: composer require monolog/monolog:"<2.7.0" --no-update
|
||||||
name: Fixup Monolog (https://github.com/magento/magento2/pull/35596)
|
name: Fixup Monolog (https://github.com/magento/magento2/pull/35596)
|
||||||
working-directory: ${{ inputs.magento_directory }}
|
working-directory: ${{ inputs.magento_directory }}
|
||||||
|
if: |
|
||||||
|
steps.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
|
||||||
|
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.magento-version.outputs.version == '"2.4.0"'
|
||||||
|
|
||||||
- run: |
|
- run: |
|
||||||
composer config --no-interaction allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
|
composer config --no-interaction allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
node_modules/
|
node_modules/
|
||||||
|
.idea/
|
||||||
|
|||||||
Vendored
+5
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"recommendations": [
|
||||||
|
"dbaeumer.vscode-eslint"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -2,6 +2,55 @@
|
|||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
|
## [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)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* 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 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))
|
||||||
|
* 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))
|
||||||
|
* **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))
|
||||||
|
* **supported-version:** package @actions/core:1.10.0 ([e4f0f85](https://github.com/graycoreio/github-actions-magento2/commit/e4f0f85e38ac6e342780d2bdaac28a19c1cab49d))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **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))
|
||||||
|
|
||||||
|
## [1.1.0](https://github.com/graycoreio/github-actions-magento2/compare/v1.0.0...v1.1.0) (2022-08-14)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* 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))
|
||||||
|
* **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))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **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))
|
||||||
|
|
||||||
## 1.0.0 (2022-08-06)
|
## 1.0.0 (2022-08-06)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
|
|
||||||
|

|
||||||
[](https://github.com/graycoreio/github-actions-magento2/actions/workflows/_internal-unit.yaml)
|
[](https://github.com/graycoreio/github-actions-magento2/actions/workflows/_internal-unit.yaml)
|
||||||
[](https://github.com/graycoreio/github-actions-magento2/actions/workflows/_internal-integration.yaml)
|
[](https://github.com/graycoreio/github-actions-magento2/actions/workflows/_internal-integration.yaml)
|
||||||
[](https://github.com/graycoreio/github-actions-magento2/actions/workflows/_internal-install.yaml)
|
[](https://github.com/graycoreio/github-actions-magento2/actions/workflows/_internal-install.yaml)
|
||||||
@@ -16,14 +17,18 @@ Opinionated Github Actions and Workflows to make building, testing, and maintain
|
|||||||
|
|
||||||
## Workflows
|
## Workflows
|
||||||
|
|
||||||
| Workflow Name | Description |
|
| Workflow Name | Description |
|
||||||
| -------------------------------------------------------- | ---------------------------------------------------------------------- |
|
| ------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
||||||
| [Integration Test](./.github/workflows/integration-README.md) | A Github Workflow that runs the Integration Tests of a Magento Package |
|
| [Integration Test](./.github/workflows/integration-README.md) | A Github Workflow that runs the Integration Tests of a Magento Package |
|
||||||
|
|
||||||
## Actions
|
## Actions
|
||||||
|
|
||||||
| Action Name | Description |
|
| Action Name | Description |
|
||||||
| ------------------------------------------------ | ------------------------------------------------------------------ |
|
| ------------------------------------------------------ | ----------------------------------------------------------------------------------------- |
|
||||||
| [Unit Test](./unit-test/README.md) | A Github Action that runs the Unit Tests a Magento Package |
|
| [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 |
|
| [Fix Magento Install](./fix-magento-install/README.md) | A Github Action that fixes Magento before `composer install` |
|
||||||
| [Supported Version](supported-version/README.md) | A Github Action that computes the currently supported Github Actions Matrix for Magento 2 |
|
| [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 |
|
||||||
|
| [Supported Version](./supported-version/README.md) | A Github Action that computes the currently supported Github Actions Matrix for Magento 2 |
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
# 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 | '__graycore' |
|
||||||
|
| mode | "The mode for setup, one of: `extension` or `store`." | true | N/A |
|
||||||
|
| magento_directory | The Magento directory for the action to run against. | 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@v3
|
||||||
|
- uses: graycoreio/github-actions-magento2/cache-magento@main
|
||||||
|
with:
|
||||||
|
magento_directory: $GITHUB_WORKSPACE
|
||||||
|
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: "__graycore"
|
||||||
|
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@v3
|
||||||
|
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"
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
# Magento 2 Coding Standard Action
|
||||||
|
|
||||||
|
A Github Action that runs the Magento Coding Standard.
|
||||||
|
|
||||||
|
## Inputs
|
||||||
|
|
||||||
|
See the [action.yml](./action.yml)
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```yml
|
||||||
|
name: Coding Standard
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
coding-standard:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: graycoreio/github-actions-magento2/coding-standard@main
|
||||||
|
with:
|
||||||
|
version: 25 # Optional, will use the latest if omitted.
|
||||||
|
path: app/code # Optional, will be used when event is not a pull request.
|
||||||
|
```
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
name: "Coding Standard"
|
||||||
|
author: "Graycore"
|
||||||
|
description: "A Github Action that runs the Magento Coding Standard."
|
||||||
|
|
||||||
|
inputs:
|
||||||
|
php_version:
|
||||||
|
required: true
|
||||||
|
default: "8.1"
|
||||||
|
description: "PHP version used to do the coding standard check."
|
||||||
|
|
||||||
|
composer_version:
|
||||||
|
required: true
|
||||||
|
default: "2"
|
||||||
|
description: "The version of composer to use."
|
||||||
|
|
||||||
|
path:
|
||||||
|
required: true
|
||||||
|
default: 'app/code'
|
||||||
|
description: "The directory (relative to the project root) in which the coding standard will be checked. Used when the event is not a pull request."
|
||||||
|
|
||||||
|
version:
|
||||||
|
required: false
|
||||||
|
description: "The version of the coding standard to use. If not provided, will use the latest version."
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- name: Checkout Project
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
path: project
|
||||||
|
|
||||||
|
- name: Create Standard Directory
|
||||||
|
shell: bash
|
||||||
|
run: mkdir standard
|
||||||
|
|
||||||
|
- name: Set PHP Version
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: ${{ inputs.php_version }}
|
||||||
|
tools: composer:v${{ inputs.composer_version }}
|
||||||
|
coverage: none
|
||||||
|
|
||||||
|
- name: Install Coding Standard
|
||||||
|
shell: bash
|
||||||
|
working-directory: standard
|
||||||
|
run: composer require "magento/magento-coding-standard:${{ inputs.version || '*' }}"
|
||||||
|
|
||||||
|
- 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
|
||||||
|
|
||||||
|
- name: Get Changed Files
|
||||||
|
shell: bash
|
||||||
|
working-directory: project
|
||||||
|
id: changed-files
|
||||||
|
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 }}
|
||||||
|
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@v3
|
||||||
|
- 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 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@v3
|
||||||
|
- 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"
|
||||||
@@ -18,6 +18,11 @@ inputs:
|
|||||||
default: "2"
|
default: "2"
|
||||||
description: "The version of composer to use"
|
description: "The version of composer to use"
|
||||||
|
|
||||||
|
use_local_source:
|
||||||
|
required: false
|
||||||
|
default: "true"
|
||||||
|
description: "Whether or not you want to test your local package or not."
|
||||||
|
|
||||||
source_folder:
|
source_folder:
|
||||||
required: true
|
required: true
|
||||||
default: $GITHUB_WORKSPACE
|
default: $GITHUB_WORKSPACE
|
||||||
@@ -42,6 +47,11 @@ inputs:
|
|||||||
default: "https://mirror.mage-os.org/"
|
default: "https://mirror.mage-os.org/"
|
||||||
description: "Where to install Magento from"
|
description: "Where to install Magento from"
|
||||||
|
|
||||||
|
composer_cache_key:
|
||||||
|
required: false
|
||||||
|
default: ''
|
||||||
|
description: A key to version the composer cache. Can be incremented if you need to bust the cache.
|
||||||
|
|
||||||
composer_auth:
|
composer_auth:
|
||||||
required: false
|
required: false
|
||||||
description: "Composer Authentication Credentials"
|
description: "Composer Authentication Credentials"
|
||||||
@@ -54,8 +64,14 @@ runs:
|
|||||||
with:
|
with:
|
||||||
php-version: ${{ inputs.php_version }}
|
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 }}
|
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
|
shell: bash
|
||||||
|
|
||||||
- run: composer create-project --repository-url="${{ inputs.magento_repository }}" "${{ inputs.magento_version }}" ${{ inputs.magento_directory }} --no-install
|
- run: composer create-project --repository-url="${{ inputs.magento_repository }}" "${{ inputs.magento_version }}" ${{ inputs.magento_directory }} --no-install
|
||||||
@@ -69,18 +85,20 @@ runs:
|
|||||||
working-directory: ${{ inputs.magento_directory }}
|
working-directory: ${{ inputs.magento_directory }}
|
||||||
id: composer-cache
|
id: composer-cache
|
||||||
run: |
|
run: |
|
||||||
echo "::set-output name=dir::$(composer config cache-files-dir)"
|
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
|
||||||
- name: "Cache Composer Packages"
|
- name: "Cache Composer Packages"
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
key: 'composer | v3 | "$(Agent.OS)" | composer.lock | ${{ inputs.composer_version }} | ${{ inputs.php_version }} | ${{ inputs.magento_version }}'
|
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 }}
|
path: ${{ steps.composer-cache.outputs.dir }}
|
||||||
|
|
||||||
- run: composer config repositories.local path ${{ inputs.source_folder }}
|
- run: composer config repositories.local path ${{ inputs.source_folder }}
|
||||||
name: Add Github Repo for Testing
|
name: Add Github Repo for Testing
|
||||||
working-directory: ${{ inputs.magento_directory }}
|
working-directory: ${{ inputs.magento_directory }}
|
||||||
shell: bash
|
shell: bash
|
||||||
|
if: ${{ inputs.use_local_source == 'true' }}
|
||||||
|
|
||||||
- run: |
|
- run: |
|
||||||
composer config --no-interaction allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
|
composer config --no-interaction allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
|
||||||
|
|||||||
Generated
+3399
-1049
File diff suppressed because it is too large
Load Diff
+10
-7
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@graycore/github-actions-magento",
|
"name": "@graycore/github-actions-magento",
|
||||||
"version": "1.0.0",
|
"version": "1.3.0",
|
||||||
"description": "Github Actions for Magento 2",
|
"description": "Github Actions for Magento 2",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "cd supported-version && npm run test && cd -",
|
"test": "cd supported-version && npm run test && cd -",
|
||||||
@@ -18,15 +18,18 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/graycoreio/github-actions-magento2#readme",
|
"homepage": "https://github.com/graycoreio/github-actions-magento2#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.9.0"
|
"@actions/core": "^1.10.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^28.1.6",
|
"@types/jest": "^28.1.7",
|
||||||
"@types/node": "^18.6.4",
|
"@types/node": "^18.8.3",
|
||||||
"esbuild": "^0.14.53",
|
"@typescript-eslint/eslint-plugin": "^5.48.1",
|
||||||
|
"@typescript-eslint/parser": "^5.48.1",
|
||||||
|
"esbuild": "^0.16.16",
|
||||||
|
"eslint": "^8.31.0",
|
||||||
"jest": "^28.1.3",
|
"jest": "^28.1.3",
|
||||||
"standard-version": "^9.5.0",
|
"standard-version": "^9.5.0",
|
||||||
"ts-jest": "^28.0.7",
|
"ts-jest": "^28.0.8",
|
||||||
"typescript": "^4.7.4"
|
"typescript": "^4.9.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,79 @@
|
|||||||
|
# Magento 2 Package Installation Test Action
|
||||||
|
|
||||||
|
A Github Action that sets Magento up to the point of composer install.
|
||||||
|
|
||||||
|
## Inputs
|
||||||
|
|
||||||
|
See the [action.yml](./action.yml)
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
### Stores
|
||||||
|
|
||||||
|
```yml
|
||||||
|
name: Setup Magento Store
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
setup-magento-store:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: ./setup-magento
|
||||||
|
with:
|
||||||
|
php-version: 8.1
|
||||||
|
tools: composer:v2
|
||||||
|
mode: store
|
||||||
|
working-directory: $GITHUB_WORKSPACE
|
||||||
|
|
||||||
|
- run: composer install
|
||||||
|
name: Composer install
|
||||||
|
shell: bash
|
||||||
|
working-directory: ${{ steps.setup-magento.outputs.path }}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Extensions
|
||||||
|
|
||||||
|
```yml
|
||||||
|
name: Setup Magento Store
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
setup-magento-extension:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- uses: ./setup-magento
|
||||||
|
with:
|
||||||
|
php-version: 8.1
|
||||||
|
tools: composer:v2
|
||||||
|
mode: extension
|
||||||
|
magento_version: 2.4.5-p1
|
||||||
|
|
||||||
|
- run: composer config repositories.local path $GITHUB_WORKSPACE
|
||||||
|
name: Add Github Repo for Testing
|
||||||
|
working-directory: ${{ steps.setup-magento.outputs.path }}
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- run: composer require my/package "@dev"
|
||||||
|
name: Attempt install
|
||||||
|
working-directory: ${{ steps.setup-magento.outputs.path }}
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
COMPOSER_AUTH: ${{ secrets.composer_auth }}
|
||||||
|
```
|
||||||
@@ -0,0 +1,100 @@
|
|||||||
|
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.1"
|
||||||
|
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: '~2.4.5'
|
||||||
|
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."
|
||||||
|
|
||||||
|
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'
|
||||||
|
|
||||||
|
- 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"
|
||||||
@@ -13,9 +13,15 @@ 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` and `custom` | false | 'currently-supported' |
|
| 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 | '' |
|
| 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.
|
||||||
|
- `nightly` - The nightly version of Magento (only available via `https://upstream-nightly.mage-os.org`)
|
||||||
|
- `all` - All versions of Magento (including patched/unpatched versions).
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
@@ -35,7 +41,6 @@ jobs:
|
|||||||
outputs:
|
outputs:
|
||||||
matrix: ${{ steps.supported-version.outputs.matrix }}
|
matrix: ${{ steps.supported-version.outputs.matrix }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- uses: graycoreio/github-actions-magento2/supported-version@main
|
- uses: graycoreio/github-actions-magento2/supported-version@main
|
||||||
id: supported-version
|
id: supported-version
|
||||||
- run: echo ${{ steps.supported-version.outputs.matrix }}
|
- run: echo ${{ steps.supported-version.outputs.matrix }}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ description: "A Github Action that computes the Github Actions matrix for the ch
|
|||||||
inputs:
|
inputs:
|
||||||
kind:
|
kind:
|
||||||
required: false
|
required: false
|
||||||
description: "The kind of versions you want to return. Allowed values are `currently-supported, latest, custom`"
|
description: "The kind of versions you want to return. Allowed values are `currently-supported`, `latest`, `custom`, `nightly` and `all`"
|
||||||
default: "currently-supported"
|
default: "currently-supported"
|
||||||
custom_versions:
|
custom_versions:
|
||||||
required: false
|
required: false
|
||||||
|
|||||||
Vendored
+5
-5
File diff suppressed because one or more lines are too long
@@ -5,7 +5,7 @@
|
|||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "esbuild --outfile=dist/index.js --platform=node --bundle --minify src/index.ts",
|
"build": "npx esbuild --outfile=dist/index.js --platform=node --bundle --minify src/index.ts",
|
||||||
"test": "jest"
|
"test": "jest"
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "",
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ export const KNOWN_KINDS = {
|
|||||||
'currently-supported': true,
|
'currently-supported': true,
|
||||||
'latest': true,
|
'latest': true,
|
||||||
'custom': true,
|
'custom': true,
|
||||||
|
'nightly': true,
|
||||||
|
'all': true,
|
||||||
}
|
}
|
||||||
|
|
||||||
export const isValidKind = (kind: string): boolean => {
|
export const isValidKind = (kind: string): boolean => {
|
||||||
|
|||||||
@@ -1,9 +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"
|
|
||||||
]
|
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
import { getCurrentlySupportedVersions } from "./get-currently-supported";
|
||||||
|
|
||||||
|
describe('getCurrentlySupportedVersions', () => {
|
||||||
|
it('should say that v2.4.0 is not supported in 2025', () => {
|
||||||
|
const date: Date = new Date('2025-01-01T00:00:00Z');
|
||||||
|
expect(getCurrentlySupportedVersions(date)).not.toContain('magento/project-community-edition:2.4.0');
|
||||||
|
});
|
||||||
|
|
||||||
|
test.each([
|
||||||
|
//TODO: add a release-date so that past dates do not incur non-contemporaneous
|
||||||
|
// versions.
|
||||||
|
['2023-01-01T00:00:00Z', 'First day of 2023', [
|
||||||
|
'magento/project-community-edition:2.4.4-p2',
|
||||||
|
'magento/project-community-edition:2.4.4-p3',
|
||||||
|
'magento/project-community-edition:2.4.5-p1',
|
||||||
|
'magento/project-community-edition:2.4.5-p2',
|
||||||
|
'magento/project-community-edition:2.4.6',
|
||||||
|
]],
|
||||||
|
['2024-01-01T00:00:00Z', 'First day of 2024', [
|
||||||
|
'magento/project-community-edition:2.4.4-p3',
|
||||||
|
'magento/project-community-edition:2.4.5-p2',
|
||||||
|
'magento/project-community-edition:2.4.6',
|
||||||
|
]],
|
||||||
|
['2024-12-31T00:00:00Z', 'End of 2024', [
|
||||||
|
'magento/project-community-edition:2.4.4-p3',
|
||||||
|
'magento/project-community-edition:2.4.5-p2',
|
||||||
|
'magento/project-community-edition:2.4.6',
|
||||||
|
]],
|
||||||
|
['2025-08-08T00:00:00Z', 'Day Before v2.4.5 EoL', [
|
||||||
|
'magento/project-community-edition:2.4.5-p2',
|
||||||
|
'magento/project-community-edition:2.4.6',
|
||||||
|
]],
|
||||||
|
['2025-08-09T00:00:00Z', 'Day of v2.4.5 EoL', [
|
||||||
|
'magento/project-community-edition:2.4.5-p2',
|
||||||
|
'magento/project-community-edition:2.4.6',
|
||||||
|
]],
|
||||||
|
['2025-08-10T00:00:00Z', 'Day after v2.4.5 EoL', [
|
||||||
|
'magento/project-community-edition:2.4.6',
|
||||||
|
]],
|
||||||
|
])(
|
||||||
|
'supportedVersions for %s',
|
||||||
|
(date, description ,result) => {
|
||||||
|
expect(
|
||||||
|
getCurrentlySupportedVersions(new Date(date))
|
||||||
|
).toEqual(result);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
})
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
import { MagentoMatrixVersion } from '../matrix/matrix-type';
|
||||||
|
import allVersions from '../versions/individual.json';
|
||||||
|
|
||||||
|
export const getCurrentlySupportedVersions = (date: Date): string[] =>
|
||||||
|
Object.entries(<Record<string,MagentoMatrixVersion>>allVersions)
|
||||||
|
.filter(([key, value]) => new Date(value.eol) >= date)
|
||||||
|
.map(([key, value]) => key);
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
[
|
||||||
|
"magento/project-community-edition:next"
|
||||||
|
]
|
||||||
@@ -15,6 +15,13 @@ describe('getMatrixForKind', () => {
|
|||||||
expect(result.include).toBeDefined();
|
expect(result.include).toBeDefined();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('returns a matrix for `all`', () => {
|
||||||
|
const result = getMatrixForKind("all");
|
||||||
|
|
||||||
|
expect(result.magento).toBeDefined();
|
||||||
|
expect(result.include).toBeDefined();
|
||||||
|
});
|
||||||
|
|
||||||
it('returns a matrix for valid `custom`', () => {
|
it('returns a matrix for valid `custom`', () => {
|
||||||
const result = getMatrixForKind("custom", "magento/project-community-edition:2.3.7-p3");
|
const result = getMatrixForKind("custom", "magento/project-community-edition:2.3.7-p3");
|
||||||
|
|
||||||
@@ -22,6 +29,13 @@ describe('getMatrixForKind', () => {
|
|||||||
expect(result.include).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");
|
||||||
|
|
||||||
|
expect(result.magento).toBeDefined();
|
||||||
|
expect(result.include).toBeDefined();
|
||||||
|
});
|
||||||
|
|
||||||
it('returns a matrix for valid multiple `custom`', () => {
|
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", "magento/project-community-edition:2.3.7-p3,magento/project-community-edition:2.4.0");
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,22 @@
|
|||||||
import { getMatrixForVersions } from "./get-matrix-for-versions";
|
import { getMatrixForVersions } from "./get-matrix-for-versions";
|
||||||
|
|
||||||
import latestJson from '../kind/latest.json';
|
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 { getDayBefore } from '../nightly/get-day-before';
|
||||||
|
import { getCurrentlySupportedVersions } from "../kind/get-currently-supported";
|
||||||
|
|
||||||
export const getMatrixForKind = (kind: string, versions: string = "") => {
|
export const getMatrixForKind = (kind: string, versions = "") => {
|
||||||
switch(kind){
|
switch(kind){
|
||||||
case 'latest':
|
case 'latest':
|
||||||
return getMatrixForVersions(latestJson);
|
return getMatrixForVersions(latestJson);
|
||||||
case 'currently-supported':
|
case 'currently-supported':
|
||||||
return getMatrixForVersions(currentlySupportedJson);
|
return getMatrixForVersions(getCurrentlySupportedVersions(new Date()));
|
||||||
|
case 'nightly':
|
||||||
|
return amendMatrixForNext(getMatrixForVersions(nightly), 'https://upstream-mirror.mage-os.org', getDayBefore());
|
||||||
|
case 'all':
|
||||||
|
return getMatrixForVersions(Object.keys(allVersions));
|
||||||
case 'custom':
|
case 'custom':
|
||||||
return getMatrixForVersions(versions.split(","))
|
return getMatrixForVersions(versions.split(","))
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ export interface MagentoMatrixVersion {
|
|||||||
redis: string,
|
redis: string,
|
||||||
varnish: string,
|
varnish: string,
|
||||||
nginx: string,
|
nginx: string,
|
||||||
os: string
|
os: string,
|
||||||
|
eol: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface GithubActionsMatrix {
|
export interface GithubActionsMatrix {
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
/**
|
||||||
|
* Gets the date one day before the date.
|
||||||
|
*/
|
||||||
|
export const getDayBefore = (date: Date = new Date()) => {
|
||||||
|
const yesterday = new Date(date);
|
||||||
|
yesterday.setDate(yesterday.getDate() - 1);
|
||||||
|
return yesterday;
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
import { getNextVersion } from "./get-next-version"
|
||||||
|
|
||||||
|
describe('getNextVersion', () => {
|
||||||
|
|
||||||
|
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 handle the first of the month correctly', () => {
|
||||||
|
expect(getNextVersion('https://upstream-mirror.mage-os.org', new Date('2022-01-01T17:47:00')), ).toEqual('@alpha');
|
||||||
|
});
|
||||||
|
})
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
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";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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":
|
||||||
|
// See: https://github.com/mage-os/generate-mirror-repo-js/blob/bbbdf1708ea0bf8fc845aad8240d00f37632b4a7/src/release-branch-build-tools.js#L71
|
||||||
|
return "@alpha";
|
||||||
|
default:
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
@@ -3,37 +3,40 @@
|
|||||||
"magento": "magento/project-community-edition:>=2.3 <2.4",
|
"magento": "magento/project-community-edition:>=2.3 <2.4",
|
||||||
"php": 7.4,
|
"php": 7.4,
|
||||||
"composer": 1,
|
"composer": 1,
|
||||||
"mysql": "mysql:5.7",
|
"mysql": "mysql:5.7.30",
|
||||||
"elasticsearch": "elasticsearch:7.16.3",
|
"elasticsearch": "elasticsearch:7.16.3",
|
||||||
"rabbitmq": "rabbitmq:3.8",
|
"rabbitmq": "rabbitmq:3.8-management",
|
||||||
"redis": "redis:6.0",
|
"redis": "redis:6.0",
|
||||||
"varnish": "varnish:6.0",
|
"varnish": "varnish:6.0",
|
||||||
"nginx": "nginx:1.18",
|
"nginx": "nginx:1.18",
|
||||||
"os": "ubuntu-18.04"
|
"os": "ubuntu-18.04",
|
||||||
|
"eol": "2022-09-30T00:00:00+0000"
|
||||||
},
|
},
|
||||||
"magento/project-community-edition:>=2.4.0 <2.4.1": {
|
"magento/project-community-edition:>=2.4.0 <2.4.1": {
|
||||||
"magento": "magento/project-community-edition:>=2.4.0 <2.4.1",
|
"magento": "magento/project-community-edition:>=2.4.0 <2.4.1",
|
||||||
"php": 7.4,
|
"php": 7.4,
|
||||||
"composer": 1,
|
"composer": 1,
|
||||||
"mysql": "mysql:5.7",
|
"mysql": "mysql:5.7.30",
|
||||||
"elasticsearch": "elasticsearch:7.6.2",
|
"elasticsearch": "elasticsearch:7.6.2",
|
||||||
"rabbitmq": "rabbitmq:3.8",
|
"rabbitmq": "rabbitmq:3.8-management",
|
||||||
"redis": "redis:5.0",
|
"redis": "redis:5.0",
|
||||||
"varnish": "varnish:6.0",
|
"varnish": "varnish:6.0",
|
||||||
"nginx": "nginx:1.18",
|
"nginx": "nginx:1.18",
|
||||||
"os": "ubuntu-latest"
|
"os": "ubuntu-20.04",
|
||||||
|
"eol": "2022-11-28T00:00:00+0000"
|
||||||
},
|
},
|
||||||
"magento/project-community-edition:>=2.4.1 <2.4.2": {
|
"magento/project-community-edition:>=2.4.1 <2.4.2": {
|
||||||
"magento": "magento/project-community-edition:>=2.4.1 <2.4.2",
|
"magento": "magento/project-community-edition:>=2.4.1 <2.4.2",
|
||||||
"php": 7.4,
|
"php": 7.4,
|
||||||
"composer": 1,
|
"composer": 1,
|
||||||
"mysql": "mysql:8.0",
|
"mysql": "mysql:8.0.20",
|
||||||
"elasticsearch": "elasticsearch:7.7.1",
|
"elasticsearch": "elasticsearch:7.7.1",
|
||||||
"rabbitmq": "rabbitmq:3.8",
|
"rabbitmq": "rabbitmq:3.8-management",
|
||||||
"redis": "redis:5.0",
|
"redis": "redis:5.0",
|
||||||
"varnish": "varnish:6.0",
|
"varnish": "varnish:6.0",
|
||||||
"nginx": "nginx:1.18",
|
"nginx": "nginx:1.18",
|
||||||
"os": "ubuntu-latest"
|
"os": "ubuntu-20.04",
|
||||||
|
"eol": "2022-11-28T00:00:00+0000"
|
||||||
},
|
},
|
||||||
"magento/project-community-edition:>=2.4.2 <2.4.3": {
|
"magento/project-community-edition:>=2.4.2 <2.4.3": {
|
||||||
"magento": "magento/project-community-edition:>=2.4.2 <2.4.3",
|
"magento": "magento/project-community-edition:>=2.4.2 <2.4.3",
|
||||||
@@ -41,11 +44,12 @@
|
|||||||
"composer": 2,
|
"composer": 2,
|
||||||
"mysql": "mysql:8.0",
|
"mysql": "mysql:8.0",
|
||||||
"elasticsearch": "elasticsearch:7.9.3",
|
"elasticsearch": "elasticsearch:7.9.3",
|
||||||
"rabbitmq": "rabbitmq:3.8",
|
"rabbitmq": "rabbitmq:3.8-management",
|
||||||
"redis": "redis:6.0",
|
"redis": "redis:6.0",
|
||||||
"varnish": "varnish:6.0",
|
"varnish": "varnish:6.0",
|
||||||
"nginx": "nginx:1.18",
|
"nginx": "nginx:1.18",
|
||||||
"os": "ubuntu-latest"
|
"os": "ubuntu-20.04",
|
||||||
|
"eol": "2022-11-28T00:00:00+0000"
|
||||||
},
|
},
|
||||||
"magento/project-community-edition:>=2.4.3 <2.4.4": {
|
"magento/project-community-edition:>=2.4.3 <2.4.4": {
|
||||||
"magento": "magento/project-community-edition:>=2.4.3 <2.4.4",
|
"magento": "magento/project-community-edition:>=2.4.3 <2.4.4",
|
||||||
@@ -53,11 +57,12 @@
|
|||||||
"composer": 2,
|
"composer": 2,
|
||||||
"mysql": "mysql:8.0",
|
"mysql": "mysql:8.0",
|
||||||
"elasticsearch": "elasticsearch:7.16.3",
|
"elasticsearch": "elasticsearch:7.16.3",
|
||||||
"rabbitmq": "rabbitmq:3.8",
|
"rabbitmq": "rabbitmq:3.8-management",
|
||||||
"redis": "redis:6.0",
|
"redis": "redis:6.0",
|
||||||
"varnish": "varnish:6.0",
|
"varnish": "varnish:6.0",
|
||||||
"nginx": "nginx:1.18",
|
"nginx": "nginx:1.18",
|
||||||
"os": "ubuntu-latest"
|
"os": "ubuntu-20.04",
|
||||||
|
"eol": "2022-11-28T00:00:00+0000"
|
||||||
},
|
},
|
||||||
"magento/project-community-edition:>=2.4.4 <2.4.5": {
|
"magento/project-community-edition:>=2.4.4 <2.4.5": {
|
||||||
"magento": "magento/project-community-edition:>=2.4.4 <2.4.5",
|
"magento": "magento/project-community-edition:>=2.4.4 <2.4.5",
|
||||||
@@ -65,22 +70,63 @@
|
|||||||
"composer": 2,
|
"composer": 2,
|
||||||
"mysql": "mysql:8.0",
|
"mysql": "mysql:8.0",
|
||||||
"elasticsearch": "elasticsearch:7.16.3",
|
"elasticsearch": "elasticsearch:7.16.3",
|
||||||
"rabbitmq": "rabbitmq:3.9",
|
"rabbitmq": "rabbitmq:3.9-management",
|
||||||
"redis": "redis:6.2",
|
"redis": "redis:6.2",
|
||||||
"varnish": "varnish:7.0",
|
"varnish": "varnish:7.0",
|
||||||
"nginx": "nginx:1.18",
|
"nginx": "nginx:1.18",
|
||||||
"os": "ubuntu-latest"
|
"os": "ubuntu-latest",
|
||||||
|
"eol": "2025-04-24T00:00:00+0000"
|
||||||
|
},
|
||||||
|
"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-management",
|
||||||
|
"redis": "redis:6.2",
|
||||||
|
"varnish": "varnish:7.0",
|
||||||
|
"nginx": "nginx:1.18",
|
||||||
|
"os": "ubuntu-latest",
|
||||||
|
"eol": "2025-08-09T00:00:00+0000"
|
||||||
|
},
|
||||||
|
"magento/project-community-edition:>=2.4.6 <2.4.7": {
|
||||||
|
"magento": "magento/project-community-edition:>=2.4.6 <2.4.7",
|
||||||
|
"php": 8.1,
|
||||||
|
"composer": "2.4.4",
|
||||||
|
"mysql": "mysql:8.0",
|
||||||
|
"elasticsearch": "elasticsearch:7.17.5",
|
||||||
|
"rabbitmq": "rabbitmq:3.9-management",
|
||||||
|
"redis": "redis:7.0",
|
||||||
|
"varnish": "varnish:7.1",
|
||||||
|
"nginx": "nginx:1.18",
|
||||||
|
"os": "ubuntu-latest",
|
||||||
|
"eol": "2026-03-14T00:00:00+0000"
|
||||||
},
|
},
|
||||||
"magento/project-community-edition": {
|
"magento/project-community-edition": {
|
||||||
"magento": "magento/project-community-edition",
|
"magento": "magento/project-community-edition",
|
||||||
"php": 8.1,
|
"php": 8.1,
|
||||||
|
"composer": "2.4.4",
|
||||||
|
"mysql": "mysql:8.0",
|
||||||
|
"elasticsearch": "elasticsearch:7.17.5",
|
||||||
|
"rabbitmq": "rabbitmq:3.9-management",
|
||||||
|
"redis": "redis:7.0",
|
||||||
|
"varnish": "varnish:7.1",
|
||||||
|
"nginx": "nginx:1.18",
|
||||||
|
"os": "ubuntu-latest",
|
||||||
|
"eol": "2026-03-14T00:00:00+0000"
|
||||||
|
},
|
||||||
|
"magento/project-community-edition:next": {
|
||||||
|
"magento": "magento/project-community-edition:next",
|
||||||
|
"php": 8.1,
|
||||||
"composer": 2,
|
"composer": 2,
|
||||||
"mysql": "mysql:8.0",
|
"mysql": "mysql:8.0",
|
||||||
"elasticsearch": "elasticsearch:7.16.3",
|
"elasticsearch": "elasticsearch:7.17.5",
|
||||||
"rabbitmq": "rabbitmq:3.9",
|
"rabbitmq": "rabbitmq:3.9-management",
|
||||||
"redis": "redis:6.2",
|
"redis": "redis:7.0",
|
||||||
"varnish": "varnish:7.0",
|
"varnish": "varnish:7.1",
|
||||||
"nginx": "nginx:1.18",
|
"nginx": "nginx:1.18",
|
||||||
"os": "ubuntu-latest"
|
"os": "ubuntu-latest",
|
||||||
|
"eol": "2026-03-14T00:00:00+0000"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3,61 +3,79 @@
|
|||||||
"magento": "magento/project-community-edition:2.3.7-p3",
|
"magento": "magento/project-community-edition:2.3.7-p3",
|
||||||
"php": 7.4,
|
"php": 7.4,
|
||||||
"composer": 1,
|
"composer": 1,
|
||||||
"mysql": "mysql:5.7",
|
"mysql": "mysql:5.7.30",
|
||||||
"elasticsearch": "elasticsearch:7.16.3",
|
"elasticsearch": "elasticsearch:7.16.3",
|
||||||
"rabbitmq": "rabbitmq:3.8",
|
"rabbitmq": "rabbitmq:3.8-management",
|
||||||
"redis": "redis:6.0",
|
"redis": "redis:6.0",
|
||||||
"varnish": "varnish:6.0",
|
"varnish": "varnish:6.0",
|
||||||
"nginx": "nginx:1.18",
|
"nginx": "nginx:1.18",
|
||||||
"os": "ubuntu-18.04"
|
"os": "ubuntu-18.04",
|
||||||
|
"eol": "2022-08-09T00:00:00+0000"
|
||||||
|
},
|
||||||
|
"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-management",
|
||||||
|
"redis": "redis:6.0",
|
||||||
|
"varnish": "varnish:6.0",
|
||||||
|
"nginx": "nginx:1.18",
|
||||||
|
"os": "ubuntu-18.04",
|
||||||
|
"eol": "2022-09-30T00:00:00+0000"
|
||||||
},
|
},
|
||||||
"magento/project-community-edition:2.4.0": {
|
"magento/project-community-edition:2.4.0": {
|
||||||
"magento": "magento/project-community-edition:2.4.0",
|
"magento": "magento/project-community-edition:2.4.0",
|
||||||
"php": 7.4,
|
"php": 7.4,
|
||||||
"composer": 1,
|
"composer": 1,
|
||||||
"mysql": "mysql:5.7",
|
"mysql": "mysql:5.7.30",
|
||||||
"elasticsearch": "elasticsearch:7.6.2",
|
"elasticsearch": "elasticsearch:7.6.2",
|
||||||
"rabbitmq": "rabbitmq:3.8",
|
"rabbitmq": "rabbitmq:3.8-management",
|
||||||
"redis": "redis:5.0",
|
"redis": "redis:5.0",
|
||||||
"varnish": "varnish:6.0",
|
"varnish": "varnish:6.0",
|
||||||
"nginx": "nginx:1.18",
|
"nginx": "nginx:1.18",
|
||||||
"os": "ubuntu-latest"
|
"os": "ubuntu-20.04",
|
||||||
|
"eol": "2020-10-15T00:00:00+0000"
|
||||||
},
|
},
|
||||||
"magento/project-community-edition:2.4.0-p1": {
|
"magento/project-community-edition:2.4.0-p1": {
|
||||||
"magento": "magento/project-community-edition:2.4.0-p1",
|
"magento": "magento/project-community-edition:2.4.0-p1",
|
||||||
"php": 7.4,
|
"php": 7.4,
|
||||||
"composer": 1,
|
"composer": 1,
|
||||||
"mysql": "mysql:5.7",
|
"mysql": "mysql:5.7.30",
|
||||||
"elasticsearch": "elasticsearch:7.6.2",
|
"elasticsearch": "elasticsearch:7.6.2",
|
||||||
"rabbitmq": "rabbitmq:3.8",
|
"rabbitmq": "rabbitmq:3.8-management",
|
||||||
"redis": "redis:5.0",
|
"redis": "redis:5.0",
|
||||||
"varnish": "varnish:6.0",
|
"varnish": "varnish:6.0",
|
||||||
"nginx": "nginx:1.18",
|
"nginx": "nginx:1.18",
|
||||||
"os": "ubuntu-latest"
|
"os": "ubuntu-20.04",
|
||||||
|
"eol": "2022-11-28T00:00:00+0000"
|
||||||
},
|
},
|
||||||
"magento/project-community-edition:2.4.1": {
|
"magento/project-community-edition:2.4.1": {
|
||||||
"magento": "magento/project-community-edition:2.4.1",
|
"magento": "magento/project-community-edition:2.4.1",
|
||||||
"php": 7.4,
|
"php": 7.4,
|
||||||
"composer": 1,
|
"composer": 1,
|
||||||
"mysql": "mysql:8.0",
|
"mysql": "mysql:8.0.20",
|
||||||
"elasticsearch": "elasticsearch:7.7.1",
|
"elasticsearch": "elasticsearch:7.7.1",
|
||||||
"rabbitmq": "rabbitmq:3.8",
|
"rabbitmq": "rabbitmq:3.8-management",
|
||||||
"redis": "redis:5.0",
|
"redis": "redis:5.0",
|
||||||
"varnish": "varnish:6.0",
|
"varnish": "varnish:6.0",
|
||||||
"nginx": "nginx:1.18",
|
"nginx": "nginx:1.18",
|
||||||
"os": "ubuntu-latest"
|
"os": "ubuntu-20.04",
|
||||||
|
"eol": "2021-02-09T00:00:00+0000"
|
||||||
},
|
},
|
||||||
"magento/project-community-edition:2.4.1-p1": {
|
"magento/project-community-edition:2.4.1-p1": {
|
||||||
"magento": "magento/project-community-edition:2.4.1-p1",
|
"magento": "magento/project-community-edition:2.4.1-p1",
|
||||||
"php": 7.4,
|
"php": 7.4,
|
||||||
"composer": 1,
|
"composer": 1,
|
||||||
"mysql": "mysql:8.0",
|
"mysql": "mysql:8.0.20",
|
||||||
"elasticsearch": "elasticsearch:7.7.1",
|
"elasticsearch": "elasticsearch:7.7.1",
|
||||||
"rabbitmq": "rabbitmq:3.8",
|
"rabbitmq": "rabbitmq:3.8-management",
|
||||||
"redis": "redis:5.0",
|
"redis": "redis:5.0",
|
||||||
"varnish": "varnish:6.0",
|
"varnish": "varnish:6.0",
|
||||||
"nginx": "nginx:1.18",
|
"nginx": "nginx:1.18",
|
||||||
"os": "ubuntu-latest"
|
"os": "ubuntu-20.04",
|
||||||
|
"eol": "2022-11-28T00:00:00+0000"
|
||||||
},
|
},
|
||||||
"magento/project-community-edition:2.4.2": {
|
"magento/project-community-edition:2.4.2": {
|
||||||
"magento": "magento/project-community-edition:2.4.2",
|
"magento": "magento/project-community-edition:2.4.2",
|
||||||
@@ -65,11 +83,12 @@
|
|||||||
"composer": 2,
|
"composer": 2,
|
||||||
"mysql": "mysql:8.0",
|
"mysql": "mysql:8.0",
|
||||||
"elasticsearch": "elasticsearch:7.9.3",
|
"elasticsearch": "elasticsearch:7.9.3",
|
||||||
"rabbitmq": "rabbitmq:3.8",
|
"rabbitmq": "rabbitmq:3.8-management",
|
||||||
"redis": "redis:6.0",
|
"redis": "redis:6.0",
|
||||||
"varnish": "varnish:6.0",
|
"varnish": "varnish:6.0",
|
||||||
"nginx": "nginx:1.18",
|
"nginx": "nginx:1.18",
|
||||||
"os": "ubuntu-latest"
|
"os": "ubuntu-20.04",
|
||||||
|
"eol": "2021-05-11T00:00:00+0000"
|
||||||
},
|
},
|
||||||
"magento/project-community-edition:2.4.2-p1": {
|
"magento/project-community-edition:2.4.2-p1": {
|
||||||
"magento": "magento/project-community-edition:2.4.2-p1",
|
"magento": "magento/project-community-edition:2.4.2-p1",
|
||||||
@@ -77,11 +96,12 @@
|
|||||||
"composer": 2,
|
"composer": 2,
|
||||||
"mysql": "mysql:8.0",
|
"mysql": "mysql:8.0",
|
||||||
"elasticsearch": "elasticsearch:7.9.3",
|
"elasticsearch": "elasticsearch:7.9.3",
|
||||||
"rabbitmq": "rabbitmq:3.8",
|
"rabbitmq": "rabbitmq:3.8-management",
|
||||||
"redis": "redis:6.0",
|
"redis": "redis:6.0",
|
||||||
"varnish": "varnish:6.0",
|
"varnish": "varnish:6.0",
|
||||||
"nginx": "nginx:1.18",
|
"nginx": "nginx:1.18",
|
||||||
"os": "ubuntu-latest"
|
"os": "ubuntu-20.04",
|
||||||
|
"eol": "2021-08-10T00:00:00+0000"
|
||||||
},
|
},
|
||||||
"magento/project-community-edition:2.4.2-p2": {
|
"magento/project-community-edition:2.4.2-p2": {
|
||||||
"magento": "magento/project-community-edition:2.4.2-p2",
|
"magento": "magento/project-community-edition:2.4.2-p2",
|
||||||
@@ -89,11 +109,12 @@
|
|||||||
"composer": 2,
|
"composer": 2,
|
||||||
"mysql": "mysql:8.0",
|
"mysql": "mysql:8.0",
|
||||||
"elasticsearch": "elasticsearch:7.9.3",
|
"elasticsearch": "elasticsearch:7.9.3",
|
||||||
"rabbitmq": "rabbitmq:3.8",
|
"rabbitmq": "rabbitmq:3.8-management",
|
||||||
"redis": "redis:6.0",
|
"redis": "redis:6.0",
|
||||||
"varnish": "varnish:6.0",
|
"varnish": "varnish:6.0",
|
||||||
"nginx": "nginx:1.18",
|
"nginx": "nginx:1.18",
|
||||||
"os": "ubuntu-latest"
|
"os": "ubuntu-20.04",
|
||||||
|
"eol": "2022-11-28T00:00:00+0000"
|
||||||
},
|
},
|
||||||
"magento/project-community-edition:2.4.3": {
|
"magento/project-community-edition:2.4.3": {
|
||||||
"magento": "magento/project-community-edition:2.4.3",
|
"magento": "magento/project-community-edition:2.4.3",
|
||||||
@@ -101,11 +122,12 @@
|
|||||||
"composer": 2,
|
"composer": 2,
|
||||||
"mysql": "mysql:8.0",
|
"mysql": "mysql:8.0",
|
||||||
"elasticsearch": "elasticsearch:7.16.3",
|
"elasticsearch": "elasticsearch:7.16.3",
|
||||||
"rabbitmq": "rabbitmq:3.8",
|
"rabbitmq": "rabbitmq:3.8-management",
|
||||||
"redis": "redis:6.0",
|
"redis": "redis:6.0",
|
||||||
"varnish": "varnish:6.0",
|
"varnish": "varnish:6.0",
|
||||||
"nginx": "nginx:1.18",
|
"nginx": "nginx:1.18",
|
||||||
"os": "ubuntu-latest"
|
"os": "ubuntu-20.04",
|
||||||
|
"eol": "2021-10-12T00:00:00+0000"
|
||||||
},
|
},
|
||||||
"magento/project-community-edition:2.4.3-p1": {
|
"magento/project-community-edition:2.4.3-p1": {
|
||||||
"magento": "magento/project-community-edition:2.4.3-p1",
|
"magento": "magento/project-community-edition:2.4.3-p1",
|
||||||
@@ -113,11 +135,12 @@
|
|||||||
"composer": 2,
|
"composer": 2,
|
||||||
"mysql": "mysql:8.0",
|
"mysql": "mysql:8.0",
|
||||||
"elasticsearch": "elasticsearch:7.16.3",
|
"elasticsearch": "elasticsearch:7.16.3",
|
||||||
"rabbitmq": "rabbitmq:3.8",
|
"rabbitmq": "rabbitmq:3.8-management",
|
||||||
"redis": "redis:6.0",
|
"redis": "redis:6.0",
|
||||||
"varnish": "varnish:6.0",
|
"varnish": "varnish:6.0",
|
||||||
"nginx": "nginx:1.18",
|
"nginx": "nginx:1.18",
|
||||||
"os": "ubuntu-latest"
|
"os": "ubuntu-20.04",
|
||||||
|
"eol": "2022-04-12T00:00:00+0000"
|
||||||
},
|
},
|
||||||
"magento/project-community-edition:2.4.3-p2": {
|
"magento/project-community-edition:2.4.3-p2": {
|
||||||
"magento": "magento/project-community-edition:2.4.3-p2",
|
"magento": "magento/project-community-edition:2.4.3-p2",
|
||||||
@@ -125,11 +148,25 @@
|
|||||||
"composer": 2,
|
"composer": 2,
|
||||||
"mysql": "mysql:8.0",
|
"mysql": "mysql:8.0",
|
||||||
"elasticsearch": "elasticsearch:7.16.3",
|
"elasticsearch": "elasticsearch:7.16.3",
|
||||||
"rabbitmq": "rabbitmq:3.8",
|
"rabbitmq": "rabbitmq:3.8-management",
|
||||||
"redis": "redis:6.0",
|
"redis": "redis:6.0",
|
||||||
"varnish": "varnish:6.0",
|
"varnish": "varnish:6.0",
|
||||||
"nginx": "nginx:1.18",
|
"nginx": "nginx:1.18",
|
||||||
"os": "ubuntu-latest"
|
"os": "ubuntu-20.04",
|
||||||
|
"eol": "2022-08-09T00:00:00+0000"
|
||||||
|
},
|
||||||
|
"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-management",
|
||||||
|
"redis": "redis:6.0",
|
||||||
|
"varnish": "varnish:6.0",
|
||||||
|
"nginx": "nginx:1.18",
|
||||||
|
"os": "ubuntu-20.04",
|
||||||
|
"eol": "2022-11-28T00:00:00+0000"
|
||||||
},
|
},
|
||||||
"magento/project-community-edition:2.4.4": {
|
"magento/project-community-edition:2.4.4": {
|
||||||
"magento": "magento/project-community-edition:2.4.4",
|
"magento": "magento/project-community-edition:2.4.4",
|
||||||
@@ -137,10 +174,102 @@
|
|||||||
"composer": 2,
|
"composer": 2,
|
||||||
"mysql": "mysql:8.0",
|
"mysql": "mysql:8.0",
|
||||||
"elasticsearch": "elasticsearch:7.16.3",
|
"elasticsearch": "elasticsearch:7.16.3",
|
||||||
"rabbitmq": "rabbitmq:3.9",
|
"rabbitmq": "rabbitmq:3.9-management",
|
||||||
"redis": "redis:6.2",
|
"redis": "redis:6.2",
|
||||||
"varnish": "varnish:7.0",
|
"varnish": "varnish:7.0",
|
||||||
"nginx": "nginx:1.18",
|
"nginx": "nginx:1.18",
|
||||||
"os": "ubuntu-latest"
|
"os": "ubuntu-latest",
|
||||||
|
"eol": "2022-08-09T00:00:00+0000"
|
||||||
|
},
|
||||||
|
"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-management",
|
||||||
|
"redis": "redis:6.2",
|
||||||
|
"varnish": "varnish:7.0",
|
||||||
|
"nginx": "nginx:1.18",
|
||||||
|
"os": "ubuntu-latest",
|
||||||
|
"eol": "2022-10-11T00:00:00+0000"
|
||||||
|
},
|
||||||
|
"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-management",
|
||||||
|
"redis": "redis:6.2",
|
||||||
|
"varnish": "varnish:7.0",
|
||||||
|
"nginx": "nginx:1.18",
|
||||||
|
"os": "ubuntu-latest",
|
||||||
|
"eol": "2023-03-14T00:00:00+0000"
|
||||||
|
},
|
||||||
|
"magento/project-community-edition:2.4.4-p3": {
|
||||||
|
"magento": "magento/project-community-edition:2.4.4-p3",
|
||||||
|
"php": 8.1,
|
||||||
|
"composer": "2.2.21",
|
||||||
|
"mysql": "mysql:8.0",
|
||||||
|
"elasticsearch": "elasticsearch:7.17.5",
|
||||||
|
"rabbitmq": "rabbitmq:3.9-management",
|
||||||
|
"redis": "redis:6.2",
|
||||||
|
"varnish": "varnish:7.1",
|
||||||
|
"nginx": "nginx:1.18",
|
||||||
|
"os": "ubuntu-latest",
|
||||||
|
"eol": "2025-04-24T00:00:00+0000"
|
||||||
|
},
|
||||||
|
"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-management",
|
||||||
|
"redis": "redis:6.2",
|
||||||
|
"varnish": "varnish:7.0",
|
||||||
|
"nginx": "nginx:1.18",
|
||||||
|
"os": "ubuntu-latest",
|
||||||
|
"eol": "2022-08-09T00:00:00+0000"
|
||||||
|
},
|
||||||
|
"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-management",
|
||||||
|
"redis": "redis:6.2",
|
||||||
|
"varnish": "varnish:7.0",
|
||||||
|
"nginx": "nginx:1.18",
|
||||||
|
"os": "ubuntu-latest",
|
||||||
|
"eol": "2023-03-14T00:00:00+0000"
|
||||||
|
},
|
||||||
|
"magento/project-community-edition:2.4.5-p2": {
|
||||||
|
"magento": "magento/project-community-edition:2.4.5-p2",
|
||||||
|
"php": 8.1,
|
||||||
|
"composer": "2.2.21",
|
||||||
|
"mysql": "mysql:8.0",
|
||||||
|
"elasticsearch": "elasticsearch:7.17.5",
|
||||||
|
"rabbitmq": "rabbitmq:3.9-management",
|
||||||
|
"redis": "redis:6.2",
|
||||||
|
"varnish": "varnish:7.1",
|
||||||
|
"nginx": "nginx:1.18",
|
||||||
|
"os": "ubuntu-latest",
|
||||||
|
"eol": "2025-08-09T00:00:00+0000"
|
||||||
|
},
|
||||||
|
"magento/project-community-edition:2.4.6": {
|
||||||
|
"magento": "magento/project-community-edition:2.4.6",
|
||||||
|
"php": 8.1,
|
||||||
|
"composer": "2.4.4",
|
||||||
|
"mysql": "mysql:8.0",
|
||||||
|
"elasticsearch": "elasticsearch:7.17.5",
|
||||||
|
"rabbitmq": "rabbitmq:3.9-management",
|
||||||
|
"redis": "redis:7.0",
|
||||||
|
"varnish": "varnish:7.1",
|
||||||
|
"nginx": "nginx:1.18",
|
||||||
|
"os": "ubuntu-latest",
|
||||||
|
"eol": "2026-03-14T00:00:00+0000"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -34,12 +34,12 @@ runs:
|
|||||||
working-directory: ${{ inputs.source_folder }}
|
working-directory: ${{ inputs.source_folder }}
|
||||||
id: composer-cache
|
id: composer-cache
|
||||||
run: |
|
run: |
|
||||||
echo "::set-output name=dir::$(composer config cache-files-dir)"
|
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: "Cache Composer Packages"
|
- name: "Cache Composer Packages"
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
key: 'composer | v3 | "$(Agent.OS)" | composer.lock | ${{ inputs.php_version }}'
|
key: "composer | v3 | ${{ hashFiles('composer.lock') }} | ${{ runner.os }} | ${{ inputs.php_version }}"
|
||||||
path: ${{ steps.composer-cache.outputs.dir }}
|
path: ${{ steps.composer-cache.outputs.dir }}
|
||||||
|
|
||||||
- run: composer install
|
- run: composer install
|
||||||
|
|||||||
Reference in New Issue
Block a user