-
-
Notifications
You must be signed in to change notification settings - Fork 1
163 lines (144 loc) · 5.67 KB
/
magento-compatibility.yml
File metadata and controls
163 lines (144 loc) · 5.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
name: Magento Compatibility Test
on:
pull_request:
branches: [main]
push:
branches: [main]
workflow_dispatch:
jobs:
magento-compatibility-matrix:
name: Magento ${{ matrix.magento-version }} with PHP ${{ matrix.php-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- magento-version: "2.4.7-p9"
php-version: "8.3"
search-engine-name: "opensearch"
- magento-version: "2.4.8-p4"
php-version: "8.4"
search-engine-name: "opensearch"
- magento-version: "2.4.9-beta1"
php-version: "8.4"
search-engine-name: "opensearch"
- magento-version: "2.4.9-beta1"
php-version: "8.5"
search-engine-name: "opensearch"
services:
mysql:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: magento
MYSQL_DATABASE: magento
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
opensearch:
image: opensearchproject/opensearch:2.11.0
ports:
- 9200:9200
env:
discovery.type: single-node
plugins.security.disabled: true
OPENSEARCH_JAVA_OPTS: -Xms512m -Xmx512m
options: --health-cmd="curl http://localhost:9200/_cluster/health" --health-interval=10s --health-timeout=5s --health-retries=10
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
path: mageforge
- name: Setup PHP
uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, intl, gd, xml, soap, zip, bcmath, pdo_mysql, curl, sockets
tools: composer:v2
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684
with:
path: ~/.composer/cache/files
key: ${{ runner.os }}-composer-${{ matrix.magento-version }}-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-${{ matrix.magento-version }}
- name: Clone Magento
run: |
git clone --depth=1 --branch=${{ matrix.magento-version }} https://github.com/magento/magento2.git magento2
- name: Check Search Engine status
run: |
curl -s http://localhost:9200/_cluster/health
- name: Install Magento
working-directory: magento2
env:
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
run: |
composer config minimum-stability stable
composer config prefer-stable true
composer install --no-interaction --no-progress
bin/magento setup:install \
--base-url=http://localhost \
--db-host=127.0.0.1 \
--db-name=magento \
--db-user=root \
--db-password=magento \
--admin-firstname=Admin \
--admin-lastname=User \
--admin-email=admin@example.com \
--admin-user=admin \
--admin-password=admin12345 \
--language=en_US \
--currency=USD \
--timezone=Europe/Berlin \
--use-rewrites=1 \
--backend-frontname=admin \
--search-engine=opensearch \
--opensearch-host=localhost \
--opensearch-port=9200 \
--opensearch-index-prefix=magento \
--cleanup-database
- name: Install MageForge Module from current commit
working-directory: magento2
run: |
# Add a local repository pointing to the current code
composer config repositories.mageforge-local path ../mageforge
# Install the module from the local repository
composer require --no-update openforgeproject/mageforge:@dev
# Update dependencies
composer update openforgeproject/mageforge --with-dependencies
# Enable the module and run setup upgrade
bin/magento module:enable OpenForgeProject_MageForge
bin/magento setup:upgrade
- name: Check Module Commands
working-directory: magento2
run: |
echo "Check if module is enabled:"
bin/magento module:status | grep OpenForgeProject_MageForge
echo "Check if MageForge commands are registered:"
bin/magento list | grep mageforge
echo "Verify all commands have --help available:"
bin/magento mageforge:system:version --help
bin/magento mageforge:system:check --help
bin/magento mageforge:theme:list --help
bin/magento mageforge:theme:build --help
bin/magento mageforge:theme:watch --help
bin/magento mageforge:theme:clean --help
bin/magento mageforge:theme:inspector --help
bin/magento mageforge:hyva:compatibility:check --help
bin/magento mageforge:hyva:tokens --help
echo "Verify command aliases work:"
bin/magento m:s:v --help
bin/magento m:s:c --help
bin/magento m:t:l --help
bin/magento m:t:b --help
bin/magento m:t:w --help
bin/magento m:t:c --help
bin/magento m:h:c:c --help
bin/magento frontend:list --help
bin/magento frontend:build --help
bin/magento frontend:watch --help
bin/magento frontend:clean --help
bin/magento hyva:check --help
bin/magento hyva:tokens --help
- name: Test Summary
run: |
echo "MageForge module compatibility test with Magento 2.4.8 completed"