-
-
Notifications
You must be signed in to change notification settings - Fork 1
294 lines (257 loc) · 10.3 KB
/
magento-compatibility.yml
File metadata and controls
294 lines (257 loc) · 10.3 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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
name: Magento Compatibility Test
on:
pull_request:
branches: [main]
push:
branches: [main]
workflow_dispatch:
jobs:
test-elasticsearch:
name: Magento ${{ matrix.magento-version }} with PHP ${{ matrix.php-version }} Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- magento-version: "2.4.7"
php-version: "8.3"
search-engine-name: "elasticsearch7"
- magento-version: "2.4.7-p8"
php-version: "8.3"
search-engine-name: "elasticsearch7"
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
elasticsearch:
image: elasticsearch:7.17.0
ports:
- 9200:9200
env:
discovery.type: single-node
ES_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=${{ matrix.search-engine-name }} \
--elasticsearch-host=localhost \
--elasticsearch-port=9200 \
--elasticsearch-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 ${{ matrix.magento-version }} completed"
test-opensearch:
name: Magento 2.4.8 with PHP 8.4 Test
runs-on: ubuntu-latest
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: "8.4"
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-2.4.8-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-2.4.8
- name: Clone Magento
run: |
git clone --depth=1 --branch=2.4.8 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"