Skip to content

Commit baed440

Browse files
committed
Copy generic CI/CD files
1 parent 76a077a commit baed440

7 files changed

Lines changed: 150 additions & 15 deletions

File tree

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
11
name: Magento 2 Integration Tests
2-
#on: ['push', 'pull_request']
3-
on:
4-
release:
5-
push:
6-
branches:
7-
- 'main'
2+
on: ['push', 'pull_request']
83

94
jobs:
105
integration-tests:
116
name: Magento 2 Integration Tests
12-
runs-on: self-hosted
13-
#runs-on: ubuntu-latest
7+
#runs-on: self-hosted
8+
runs-on: ubuntu-latest
149
container:
15-
image: yireo/magento2installed:2.4.7-p4
10+
image: yireo/magento2installed:2.4.8-p3
1611
services:
1712
mysql:
1813
image: mysql:8.0
@@ -21,13 +16,12 @@ jobs:
2116
MYSQL_USER: magento2
2217
MYSQL_PASSWORD: magento2
2318
MYSQL_DATABASE: magento2
24-
options: --tmpfs /tmp:rw --tmpfs /var/lib/mysql:rw --health-cmd="mysqladmin ping"
19+
options: --tmpfs /tmp:rw --tmpfs /var/lib/mysql:rw --health-cmd="mysqladmin ping"
2520
opensearch:
26-
image: yireo/opensearch-dummy
21+
image: yireo/opensearch:latest
2722
env:
2823
'discovery.type': single-node
29-
'xpack.security.enabled': false
30-
ES_JAVA_OPTS: "-Xms128m -Xmx128m"
24+
ES_JAVA_OPTS: "-Xms256m -Xmx256m"
3125
options: --health-cmd="curl localhost:9200/_cluster/health?wait_for_status=yellow&timeout=60s" --health-interval=10s --health-timeout=5s --health-retries=3
3226
redis:
3327
image: redis
@@ -36,6 +30,16 @@ jobs:
3630
- name: Checkout sources
3731
uses: actions/checkout@v4
3832

33+
- name: Enable log_bin_trust_function_creators
34+
run: mysql -h mysql -uroot -proot -e "SET GLOBAL log_bin_trust_function_creators=1;"
35+
36+
- name: Configure GitLab
37+
run: |
38+
test -n "${{ secrets.GITLAB_TOKEN }}" || exit 0
39+
cd /tmp/magento
40+
composer config --auth gitlab-token.gitlab.yireo.com ${{ secrets.GITLAB_TOKEN }}
41+
composer config repositories.loki-checkout composer https://gitlab.yireo.com/api/v4/group/loki-checkout/-/packages/composer/packages.json
42+
3943
- name: Add module source
4044
run: |
4145
export COMPOSER_NAME=`cat .module.ini | grep COMPOSER_NAME | cut -f2 -d= | tr -d '"'`
@@ -53,5 +57,7 @@ jobs:
5357
export MAGENTO_MODULE=${EXTENSION_VENDOR}_${EXTENSION_NAME}
5458
cd /tmp/magento/dev/tests/integration/
5559
cp -R ${GITHUB_WORKSPACE}/.github/workflows/integration-tests/* .
60+
php ../../../vendor/bin/phpunit --atleast-version 9 && cp phpunit9.xml phpunit.xml
61+
php ../../../vendor/bin/phpunit --atleast-version 10 && cp phpunit10.xml phpunit.xml
5662
php -d memory_limit=4G ../../../vendor/bin/phpunit -c phpunit.xml ../../../vendor/$COMPOSER_NAME/Test/Integration
5763
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.4/phpunit.xsd"
10+
colors="true"
11+
columns="max"
12+
beStrictAboutTestsThatDoNotTestAnything="false"
13+
bootstrap="./framework/bootstrap.php"
14+
stderr="true">
15+
<testsuites>
16+
<testsuite name="LokiCheckout">
17+
<directory>../../../app/code/Yireo/LokiCheckout*/Test/Integration</directory>
18+
<directory>../../../vendor/yireo/magento2-loki-checkout*/Test/Integration</directory>
19+
</testsuite>
20+
</testsuites>
21+
<php>
22+
<includePath>.</includePath>
23+
<includePath>testsuite</includePath>
24+
<ini name="date.timezone" value="America/Los_Angeles"/>
25+
<ini name="xdebug.max_nesting_level" value="200"/>
26+
<const name="TESTS_INSTALL_CONFIG_FILE" value="etc/install-config-mysql.php"/>
27+
<const name="TESTS_GLOBAL_CONFIG_FILE" value="etc/config-global.php"/>
28+
<const name="TESTS_GLOBAL_CONFIG_DIR" value="../../../app/etc"/>
29+
<const name="TESTS_POST_INSTALL_SETUP_COMMAND_CONFIG_FILE" value="etc/post-install-setup-command-config.php"/>
30+
<const name="TESTS_CLEANUP" value="enabled"/>
31+
<const name="TESTS_MEM_USAGE_LIMIT" value="8192M"/>
32+
<const name="TESTS_MEM_LEAK_LIMIT" value=""/>
33+
<const name="TESTS_EXTRA_VERBOSE_LOG" value="1"/>
34+
<const name="TESTS_MAGENTO_MODE" value="developer"/>
35+
<const name="TESTS_ERROR_LOG_LISTENER_LEVEL" value="-1"/>
36+
<const name="USE_OVERRIDE_CONFIG" value="enabled"/>
37+
</php>
38+
<extensions>
39+
<bootstrap class="Magento\TestFramework\Event\Subscribers"/>
40+
</extensions>
41+
</phpunit>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/9.6/phpunit.xsd"
4+
colors="true"
5+
beStrictAboutTestsThatDoNotTestAnything="false"
6+
bootstrap="./framework/bootstrap.php"
7+
stderr="true"
8+
>
9+
<testsuites>
10+
<testsuite name="LokiCheckout">
11+
<directory>../../../app/code/Yireo/LokiCheckout*/Test/Integration</directory>
12+
<directory>../../../vendor/yireo/magento2-loki-checkout*/Test/Integration</directory>
13+
</testsuite>
14+
</testsuites>
15+
<php>
16+
<includePath>.</includePath>
17+
<includePath>testsuite</includePath>
18+
<ini name="date.timezone" value="America/Los_Angeles"/>
19+
<ini name="xdebug.max_nesting_level" value="200"/>
20+
<const name="TESTS_INSTALL_CONFIG_FILE" value="etc/install-config-mysql.php"/>
21+
<const name="TESTS_GLOBAL_CONFIG_FILE" value="etc/config-global.php"/>
22+
<const name="TESTS_GLOBAL_CONFIG_DIR" value="../../../app/etc"/>
23+
<const name="TESTS_POST_INSTALL_SETUP_COMMAND_CONFIG_FILE" value="etc/post-install-setup-command-config.php"/>
24+
<const name="TESTS_CLEANUP" value="enabled"/>
25+
<const name="TESTS_MEM_USAGE_LIMIT" value="8192M"/>
26+
<const name="TESTS_MEM_LEAK_LIMIT" value=""/>
27+
<const name="TESTS_EXTRA_VERBOSE_LOG" value="1"/>
28+
<const name="TESTS_MAGENTO_MODE" value="developer"/>
29+
<const name="TESTS_ERROR_LOG_LISTENER_LEVEL" value="-1"/>
30+
</php>
31+
<listeners>
32+
<listener class="Magento\TestFramework\Event\PhpUnit"/>
33+
<listener class="Magento\TestFramework\ErrorLog\Listener"/>
34+
</listeners>
35+
</phpunit>

.github/workflows/static-tests.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Magento 2 Static Tests
2+
on: ['push', 'pull_request']
3+
4+
jobs:
5+
static-tests:
6+
name: Magento 2 Static Tests
7+
#runs-on: self-hosted
8+
runs-on: ubuntu-latest
9+
container:
10+
image: yireo/magento2installed:2.4.8-p3
11+
steps:
12+
- name: Checkout sources
13+
uses: actions/checkout@v4
14+
15+
- name: Configure GitLab
16+
run: |
17+
test -n "${{ secrets.GITLAB_TOKEN }}" || exit 0
18+
cd /tmp/magento
19+
composer config --auth gitlab-token.gitlab.yireo.com ${{ secrets.GITLAB_TOKEN }}
20+
composer config repositories.loki-checkout composer https://gitlab.yireo.com/api/v4/group/loki-checkout/-/packages/composer/packages.json
21+
22+
- name: Add module source
23+
run: |
24+
export COMPOSER_NAME=`cat .module.ini | grep COMPOSER_NAME | cut -f2 -d= | tr -d '"'`
25+
cp -R ${GITHUB_WORKSPACE} /tmp/magento/package-source
26+
cd /tmp/magento
27+
composer config repositories.local-source path package-source/
28+
composer config --no-plugins allow-plugins true
29+
composer require --prefer-source -- ${COMPOSER_NAME}:@dev yireo/magento2-integration-test-helper
30+
composer require --dev --prefer-source -- phpstan/phpstan bitexpert/phpstan-magento phpstan/extension-installer
31+
32+
- name: Run Magento 2 PHPStan Tests
33+
run: |
34+
export COMPOSER_NAME=`cat .module.ini | grep COMPOSER_NAME | cut -f2 -d= | tr -d '"'`
35+
export LEVEL=`echo '<?= json_decode(file_get_contents("MODULE.json"), true)["phpstan_level"];' | php`
36+
php -d memory_limit=4G /tmp/magento/vendor/bin/phpstan analyse --level $LEVEL ${GITHUB_WORKSPACE}
37+

.github/workflows/unit-tests.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,21 @@ on: ['push', 'pull_request']
44
jobs:
55
unit-tests:
66
name: Magento 2 Unit Tests
7+
#runs-on: self-hosted
78
runs-on: ubuntu-latest
89
container:
9-
image: yireo/magento2installed:2.4.7-p4
10+
image: yireo/magento2installed:2.4.8-p3
1011
steps:
1112
- name: Checkout sources
1213
uses: actions/checkout@v4
1314

15+
- name: Configure GitLab
16+
run: |
17+
test -n "${{ secrets.GITLAB_TOKEN }}" || exit 0
18+
cd /tmp/magento
19+
composer config --auth gitlab-token.gitlab.yireo.com ${{ secrets.GITLAB_TOKEN }}
20+
composer config repositories.loki-checkout composer https://gitlab.yireo.com/api/v4/group/loki-checkout/-/packages/composer/packages.json
21+
1422
- name: Add module source
1523
run: |
1624
export COMPOSER_NAME=`cat .module.ini | grep COMPOSER_NAME | cut -f2 -d= | tr -d '"'`

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [0.4.3] - 30 December 2025
10+
### Fixed
11+
- Default unknown field types to `input`
12+
- Add field dependencies
13+
- Allow for fieldsets
14+
- Redirect massactions simply to current page
15+
- WIP UiComponents
16+
917
## [0.4.2] - 21 November 2025
1018
### Fixed
1119
- First draft of new entity select field

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "loki/magento2-admin-components",
3-
"version": "0.4.2",
3+
"version": "0.4.3",
44
"description": "N/A",
55
"type": "magento2-module",
66
"keywords": [

0 commit comments

Comments
 (0)