Skip to content

Commit

Permalink
feat(*): Set 2.4.7 as default magento version and 8.2 as default PHP …
Browse files Browse the repository at this point in the history
…version (#11)

* feat(*): set 2.4.7 as default magento version and 8.2 as default php version

* chore(*): Prepare release 3.0.0 and major tag implementation
  • Loading branch information
julienloizelet committed Apr 11, 2024
1 parent ecf86e1 commit 2b98d84
Show file tree
Hide file tree
Showing 9 changed files with 88 additions and 47 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/keepalive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- cron: '0 3 * * 4'

permissions:
contents: write
actions: write

jobs:
keep-alive:
Expand All @@ -16,11 +16,9 @@ jobs:
steps:

- name: Clone project files
uses: actions/checkout@v3
uses: actions/checkout@v4

# keepalive-workflow adds a dummy commit if there's no other action here, keeps
# GitHub from turning off tests after 60 days
- uses: gautamkrishnar/keepalive-workflow@v1
# keepalive-workflow keeps GitHub from turning off tests after 60 days
- uses: gautamkrishnar/keepalive-workflow@v2
with:
commit_message: "chore(*): Automated commit to keep the repository active"
time_elapsed: 50
10 changes: 5 additions & 5 deletions .github/workflows/mftf-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
fail-fast: false
matrix:
# Last version
m2-version: [ "2.4.6" ]
php-version: [ "8.2" ]
m2-version: [ "2.4.7" ]
php-version: [ "8.3" ]
magento-repository: ['https://repo.magento.com/']


Expand All @@ -32,7 +32,7 @@ jobs:
steps:

- name: Clone current repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Magento 2 with DDEV
id: magento2-install
Expand All @@ -55,8 +55,8 @@ jobs:
run: |
cd .ddev && ddev nginx-config okaeli-add-on/magento2/custom_files/mftf/nginx-site.conf
- name: Disable some extensions for 2.4.6
if: startsWith(matrix.m2-version, '2.4.6')
- name: Disable some extensions for 2.4.7
if: startsWith(matrix.m2-version, '2.4.7')
run: |
ddev magento module:disable Magento_AdminAdobeImsTwoFactorAuth
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/module-with-end-to-end-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ jobs:
- m2-version: '2.3.7-p4'
php-version: '7.4'
magento-repository: 'https://repo.magento.com/'
- m2-version: '2.4.5'
php-version: '8.1'
magento-repository: 'https://mirror.mage-os.org/'
- m2-version: '2.4.6'
php-version: '8.2'
magento-repository: 'https://mirror.mage-os.org/'
- m2-version: '2.4.7'
php-version: '8.3'
magento-repository: 'https://repo.magento.com/'


Expand All @@ -45,7 +45,7 @@ jobs:
steps:

- name: Clone current repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Magento 2 with DDEV
uses: ./
Expand All @@ -61,7 +61,7 @@ jobs:
ddev restart
- name: Clone M2 ${{ env.EXTENSION_NAME }} files
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: my-own-modules/${{ env.EXTENSION_PATH }}
repository: ${{ env.EXTENSION_GITHUB_URL }}
Expand All @@ -80,8 +80,8 @@ jobs:
run: |
ddev composer require ${{ env.EXTENSION_PACKAGE_NAME }}:@dev --no-interaction
- name: Disable some extensions for 2.4.6
if: startsWith(matrix.m2-version, '2.4.6')
- name: Disable some extensions for >= 2.4.6
if: contains(fromJson('["2.4.6","2.4.7"]'),matrix.m2-version)
run: |
ddev magento module:disable Magento_AdminAdobeImsTwoFactorAuth
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/module-with-static-and-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ jobs:
- m2-version: '2.4.0'
php-version: '7.4'
magento-repository: 'https://repo.magento.com/'
- m2-version: '2.4.6'
php-version: '8.2'
- m2-version: '2.4.7'
php-version: '8.3'
magento-repository: 'https://repo.magento.com/'

name: Static and unit test suite
Expand All @@ -47,7 +47,7 @@ jobs:
steps:

- name: Clone current repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Magento with DDEV
uses: ./
Expand All @@ -58,7 +58,7 @@ jobs:
magento_repository: ${{ matrix.magento-repository }}

- name: Clone ${{ env.EXTENSION_NAME }} module files
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: my-own-modules/${{ env.EXTENSION_PATH }}
repository: ${{ env.EXTENSION_GITHUB_URL }}
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/module-with-varnish-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ jobs:
fail-fast: false
matrix:
# Last one for the current and previous minor, greatest php version
m2-version: [ "2.3.7-p4", "2.4.6" ]
php-version: [ "7.4", "8.2" ]
m2-version: [ "2.3.7-p4", "2.4.7" ]
php-version: [ "7.4", "8.3" ]
magento-repository: [ "https://repo.magento.com/", "https://mirror.mage-os.org/" ]
exclude:
- { php-version: "8.2", m2-version: "2.3.7-p4" }
- { php-version: "7.4", m2-version: "2.4.6" }
- { php-version: "8.2", m2-version: "2.4.6", "magento-repository" : "https://mirror.mage-os.org/" }
- { php-version: "8.3", m2-version: "2.3.7-p4" }
- { php-version: "7.4", m2-version: "2.4.7" }
- { php-version: "8.3", m2-version: "2.4.7", "magento-repository" : "https://mirror.mage-os.org/" }

name: Installation and Varnish test suite
# @see https://devdocs.magento.com/marketplace/sellers/installation-and-varnish-tests.html
Expand All @@ -47,7 +47,7 @@ jobs:
steps:

- name: Clone current repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Magento with DDEV
uses: ./
Expand All @@ -60,7 +60,7 @@ jobs:
varnish_setup: "true"

- name: Clone ${{ env.EXTENSION_NAME }} module files
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: my-own-modules/${{ env.EXTENSION_PATH }}
repository: ${{ env.EXTENSION_GITHUB_URL }}
Expand Down Expand Up @@ -88,8 +88,8 @@ jobs:
ddev magento config:set system/full_page_cache/caching_application 2
ddev magento setup:performance:generate-fixtures ./varnish-profile.xml
- name: Disable some extensions for 2.4.6
if: startsWith(matrix.m2-version, '2.4.6')
- name: Disable some extensions for 2.4.7
if: startsWith(matrix.m2-version, '2.4.7')
run: |
ddev magento maintenance:enable
ddev magento module:disable --clear-static-content Magento_AdminAdobeImsTwoFactorAuth
Expand Down
47 changes: 40 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ jobs:
permissions:
contents: write

outputs:
last_tag: ${{ steps.set-outputs.outputs.last_tag }}
major_tag: ${{ steps.set-outputs.outputs.major_tag }}

steps:
- name: Check naming convention
run: |
Expand All @@ -34,12 +38,17 @@ jobs:
exit 1
fi
- name: Set version number without v
- name: Set release version without v prefix
run: |
echo "VERSION_NUMBER=$(echo ${{ github.event.inputs.tag_name }} | sed 's/v//g' )" >> $GITHUB_ENV
- name: Set major tag with v prefix
run: |
echo "MAJOR_TAG=$(echo ${{ github.event.inputs.tag_name }} | cut -d. -f1)" >> $GITHUB_ENV

- name: Clone sources
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Check version ${{ env.VERSION_NUMBER }} consistency in CHANGELOG and README
run: |
Expand All @@ -65,17 +74,17 @@ jobs:
fi
README_VERSION=$(grep -E "$GITHUB_REPOSITORY@v(.*)" README.md | sed 's/ //g')
echo $README_VERSION
echo "-uses:$GITHUB_REPOSITORY@v${{ env.VERSION_NUMBER }}"
if [[ $README_VERSION == "-uses:$GITHUB_REPOSITORY@v${{ env.VERSION_NUMBER }}" ]]
echo "-uses:$GITHUB_REPOSITORY@${{ env.MAJOR_TAG }}"
if [[ $README_VERSION == "-uses:$GITHUB_REPOSITORY@${{ env.MAJOR_TAG }}" ]]
then
echo "Version in README.md: OK"
else
echo "Version in README.md: KO"
exit 1
fi
- name: Create Tag ${{ github.event.inputs.tag_name }}
uses: actions/github-script@v6
- name: Create Tag (with a v prefix)
uses: actions/github-script@v7
with:
github-token: ${{ github.token }}
script: |
Expand All @@ -92,10 +101,34 @@ jobs:
echo "$VERSION_RELEASE_NOTES" >> CHANGELOG.txt
- name: Create release ${{ env.VERSION_NUMBER }}
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
body_path: CHANGELOG.txt
name: ${{ env.VERSION_NUMBER }}
tag_name: ${{ github.event.inputs.tag_name }}
draft: ${{ github.event.inputs.draft }}
prerelease: ${{ github.event.inputs.prerelease }}

- name: Set outputs
id: set-outputs
run: |
echo "last_tag=${{ github.event.inputs.tag_name }}" >> $GITHUB_OUTPUT
echo "major_tag=${{ env.MAJOR_TAG }}" >> $GITHUB_OUTPUT
update-major-tag:
name: Update major tag
runs-on: ubuntu-latest
needs: create-release
permissions:
contents: write

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Move or create the major tag
run: git tag -f ${{ needs.create-release.outputs.major_tag }} ${{ needs.create-release.outputs.last_tag }}

- name: Push the major tag
run: git push origin ${{ needs.create-release.outputs.major_tag }} --force
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

The [public API](https://semver.org/spec/v2.0.0.html#spec-item-1) of this project is defined by the `action.yaml` file.

---

## [3.0.0](https://github.com/julienloizelet/magento2-ddev-installation/releases/tag/v3.0.0) - 2024-04-11
[_Compare with previous release_](https://github.com/julienloizelet/magento2-ddev-installation/compare/v2.1.1...v3.0.0)

### Changed

- **Breaking change**: Use `2.4.7` as default Magento version
- **Breaking change**: Use `8.3` as default PHP version


---

## [2.1.1](https://github.com/julienloizelet/magento2-ddev-installation/releases/tag/v2.1.1) - 2023-07-25
Expand Down
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ _We will suppose here that you want to test on a Magento 2.4.5 instance with PHP
You can add the following step in your workflow:

```yaml
- uses: julienloizelet/magento2-ddev-installation@v2.1.1
- uses: julienloizelet/magento2-ddev-installation@v3
with:
php_version: "8.1"
magento_version: "2.4.5"
Expand All @@ -60,7 +60,7 @@ PHP version to use in the web container.

Default: `8.2`.

Allowed values are: `7.2`, `7.3`, `7.4`, `8.1`, `8.2`.
Allowed values are: `7.2`, `7.3`, `7.4`, `8.1`, `8.2`, `8.3`.

Please choose a PHP version that is compatible with the `magento_version` below.

Expand Down Expand Up @@ -89,12 +89,12 @@ Could be "magento/project-community-edition", "magento/project-enterprise-editio

The Magento release version to install.

Default: `2.4.6`.
Default: `2.4.7`.

You can use `X.Y.Z` format or `X.Y.Z-pN` format for patch release.

Allowed versions are `2.3.0`, `2.3.1`, `2.3.2`, `2.3.3`, `2.3.4`, `2.3.5`, `2.3.6`, `2.3.7`, `2.4.0`,
`2.4.1`, `2.4.2`, `2.4.3`,`2.4.4`, `2.4.5`, `2.4.6` and any of their patches versions.
`2.4.1`, `2.4.2`, `2.4.3`,`2.4.4`, `2.4.5`, `2.4.6`, `2.4.7` and any of their patches versions.

Please note that available versions depend on the chosen `magento_repository`.

Expand Down Expand Up @@ -237,7 +237,7 @@ by adapting the following steps:

```yaml
- name: Clone module files
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: my-own-modules/<some-path>
```
Expand Down Expand Up @@ -299,12 +299,11 @@ bin/magento setup:install \


The Magento 2 environment is a Docker environment created with DDEV and comes with the following services:
- `web`: PHP `8.1`, nginx-fpm, NodeJs
- `web`: PHP, nginx-fpm, NodeJs
- `db`: MariaDb
- `elastisearch`
- `memcached`
- `redis`
- `mailhog`


Finally, the structure of your `$GITHUB_WORKSPACE` will look like below.
Expand Down
4 changes: 2 additions & 2 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ inputs:
php_version:
type: string
required: false
default: "8.1"
default: "8.2"
description: "PHP Version to use"

magento_edition:
Expand All @@ -19,7 +19,7 @@ inputs:
magento_version:
type: string
required: false
default: "2.4.6"
default: "2.4.7"
description: "The Magento release version to install"

magento_repository:
Expand Down

0 comments on commit 2b98d84

Please sign in to comment.