Skip to content

Commit b438e0c

Browse files
authored
Merge pull request #165 from kapilpandya22/feature/mess-detector-multi-version
Feature/mess detector multi version
2 parents 0829a22 + ebe7508 commit b438e0c

16 files changed

Lines changed: 284 additions & 1 deletion

File tree

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Build Mess Detector Images
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 6 * * 0" # 6 AM Weekly
7+
push:
8+
branches:
9+
- master
10+
paths:
11+
- .github/workflows/mess-detector-images.yml
12+
- 'magento-mess-detector/**'
13+
workflow_run:
14+
workflows:
15+
- Build Integration Images
16+
types:
17+
- completed
18+
branches:
19+
- master
20+
21+
jobs:
22+
build:
23+
name: "Build and deploy"
24+
25+
runs-on: "ubuntu-latest"
26+
27+
strategy:
28+
matrix:
29+
php-version:
30+
- "7.3"
31+
- "7.4"
32+
- "8.1"
33+
- "8.2"
34+
- "8.3"
35+
- "8.4"
36+
- "8.5"
37+
actions-with-docker-image:
38+
- "magento-mess-detector"
39+
40+
env:
41+
DOCKER_USERNAME: "extdn"
42+
43+
steps:
44+
- name: "Checkout"
45+
uses: "actions/checkout@v6"
46+
47+
- name: "Build Docker image"
48+
run: "docker build --tag extdn/${{ matrix.actions-with-docker-image }}-action:${{ matrix.php-version }}-latest ${{ matrix.actions-with-docker-image }}/. -f ${{ matrix.actions-with-docker-image }}/Dockerfile:${{ matrix.php-version }}"
49+
50+
- name: "Docker Login"
51+
run: "echo ${{ secrets.DOCKER_PASSWORD }} | $(which docker) login --password-stdin --username ${{ env.DOCKER_USERNAME }}"
52+
53+
- name: "Push Docker image (latest)"
54+
run: "docker push extdn/${{ matrix.actions-with-docker-image }}-action:${{ matrix.php-version }}-latest"
55+
56+
- name: "Docker Logout"
57+
run: "docker logout"
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: 'Magento 2 Mess Detector'
2+
author: 'ExtDN'
3+
description: 'performs php static code analysis with the Magento 2 Mess Detector ruleset'
4+
runs:
5+
using: 'docker'
6+
image: 'docker://extdn/magento-mess-detector-action:7.3-latest'
7+
branding:
8+
icon: 'code'
9+
color: 'green'
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: 'Magento 2 Mess Detector'
2+
author: 'ExtDN'
3+
description: 'performs php static code analysis with the Magento 2 Mess Detector ruleset'
4+
runs:
5+
using: 'docker'
6+
image: 'docker://extdn/magento-mess-detector-action:7.4-latest'
7+
branding:
8+
icon: 'code'
9+
color: 'green'
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: 'Magento 2 Mess Detector'
2+
author: 'ExtDN'
3+
description: 'performs php static code analysis with the Magento 2 Mess Detector ruleset'
4+
runs:
5+
using: 'docker'
6+
image: 'docker://extdn/magento-mess-detector-action:8.1-latest'
7+
branding:
8+
icon: 'code'
9+
color: 'green'
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: 'Magento 2 Mess Detector'
2+
author: 'ExtDN'
3+
description: 'performs php static code analysis with the Magento 2 Mess Detector ruleset'
4+
runs:
5+
using: 'docker'
6+
image: 'docker://extdn/magento-mess-detector-action:8.2-latest'
7+
branding:
8+
icon: 'code'
9+
color: 'green'
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: 'Magento 2 Mess Detector'
2+
author: 'ExtDN'
3+
description: 'performs php static code analysis with the Magento 2 Mess Detector ruleset'
4+
runs:
5+
using: 'docker'
6+
image: 'docker://extdn/magento-mess-detector-action:8.3-latest'
7+
branding:
8+
icon: 'code'
9+
color: 'green'
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: 'Magento 2 Mess Detector'
2+
author: 'ExtDN'
3+
description: 'performs php static code analysis with the Magento 2 Mess Detector ruleset'
4+
runs:
5+
using: 'docker'
6+
image: 'docker://extdn/magento-mess-detector-action:8.4-latest'
7+
branding:
8+
icon: 'code'
9+
color: 'green'
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: 'Magento 2 Mess Detector'
2+
author: 'ExtDN'
3+
description: 'performs php static code analysis with the Magento 2 Mess Detector ruleset'
4+
runs:
5+
using: 'docker'
6+
image: 'docker://extdn/magento-mess-detector-action:8.5-latest'
7+
branding:
8+
icon: 'code'
9+
color: 'green'
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
FROM extdn/magento-integration-tests-action:7.3-latest AS builder
2+
3+
RUN echo memory_limit = -1 >> /usr/local/etc/php/conf.d/custom-memory.ini
4+
RUN composer create-project --repository=https://repo-magento-mirror.fooman.co.nz/ --no-plugins --no-install --no-interaction magento/project-community-edition /var/www/magento2ce "2.4.3-p3"
5+
6+
WORKDIR "/var/www/magento2ce"
7+
# https://github.com/composer/composer/issues/12623#issuecomment-3551953185
8+
RUN composer config --unset repositories || true
9+
RUN composer config --unset repo.0
10+
RUN composer config repo.foomanmirror composer https://repo-magento-mirror.fooman.co.nz/
11+
RUN composer config --no-plugins allow-plugins true
12+
RUN composer require hoa/regex --no-update
13+
RUN composer config --json audit.ignore '{"PKSA-z3gr-8qht-p93v": "Ignored for CI", "PKSA-rkkf-636k-qjb3": "Ignored for CI", "PKSA-wws7-mr54-jsny": "Ignored for CI", "PKSA-db8d-773v-rd1n": "Ignored for CI", "PKSA-xwpn-zs9j-6wy5": "Ignored for CI", "PKSA-sf9j-1gs7-xzvx": "Ignored for CI", "PKSA-7h5p-prw9-w5nr": "Ignored for CI", "PKSA-pwvr-3754-v57r": "Ignored for CI", "PKSA-t5r2-p5q9-mtpn": "Ignored for CI", "PKSA-6bp1-9hfj-2cgv": "Ignored for CI", "PKSA-m1ph-vmbx-2xd3": "Ignored for CI", "PKSA-6zmq-d6mk-r5wm": "Ignored for CI", "PKSA-93hy-9dc1-gbwt": "Ignored for CI", "PKSA-9p8h-97x3-qxpm": "Ignored for CI", "PKSA-4t1p-xpk2-nsss": "Ignored for CI", "PKSA-dxyf-6n16-t87m": "Ignored for CI", "PKSA-n3s6-289w-qtqb": "Ignored for CI", "PKSA-stsw-jsf7-f6vs": "Ignored for CI", "PKSA-b14r-zh1d-vdrc": "Ignored for CI", "PKSA-v5yj-8nmz-sk2q": "Ignored for CI", "PKSA-ft77-7h5f-p3r6": "Ignored for CI", "PKSA-yg4s-vh6g-jnyh": "Ignored for CI", "PKSA-wdyb-c3m7-9v88": "Ignored for CI"}'
14+
RUN composer install --prefer-dist
15+
16+
FROM extdn/magento-integration-tests-action:7.3-latest
17+
COPY --from=builder /var/www/magento2ce/ /m2/
18+
RUN echo memory_limit = -1 >> /usr/local/etc/php/conf.d/custom-memory.ini
19+
COPY phpunit.phpmd.xml /m2/dev/tests/static/phpunit.phpmd.xml
20+
COPY PhpmdRunner.php /m2/dev/tests/static/testsuite/Magento/Test/Php/PhpmdRunner.php
21+
COPY LiveCodePhpmdRunner.php /m2/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/LiveCodePhpmdRunner.php
22+
23+
COPY entrypoint.sh /entrypoint.sh
24+
ENTRYPOINT ["/entrypoint.sh"]
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
FROM extdn/magento-integration-tests-action:7.4-latest AS builder
2+
3+
RUN echo memory_limit = -1 >> /usr/local/etc/php/conf.d/custom-memory.ini
4+
RUN composer create-project --repository=https://repo-magento-mirror.fooman.co.nz/ --no-plugins --no-install --no-interaction magento/project-community-edition /var/www/magento2ce "2.4.5-p14"
5+
6+
WORKDIR "/var/www/magento2ce"
7+
# https://github.com/composer/composer/issues/12623#issuecomment-3551953185
8+
RUN composer config --unset repositories || true
9+
RUN composer config --unset repo.0
10+
RUN composer config repo.foomanmirror composer https://repo-magento-mirror.fooman.co.nz/
11+
RUN composer config --no-plugins allow-plugins true
12+
RUN composer require hoa/regex --no-update
13+
RUN composer config --json audit.ignore '{"PKSA-z3gr-8qht-p93v": "Ignored for CI", "PKSA-rkkf-636k-qjb3": "Ignored for CI", "PKSA-wws7-mr54-jsny": "Ignored for CI", "PKSA-db8d-773v-rd1n": "Ignored for CI", "PKSA-xwpn-zs9j-6wy5": "Ignored for CI", "PKSA-sf9j-1gs7-xzvx": "Ignored for CI", "PKSA-7h5p-prw9-w5nr": "Ignored for CI", "PKSA-4t1p-xpk2-nsss": "Ignored for CI", "PKSA-dxyf-6n16-t87m": "Ignored for CI", "PKSA-n3s6-289w-qtqb": "Ignored for CI", "PKSA-stsw-jsf7-f6vs": "Ignored for CI", "PKSA-yg4s-vh6g-jnyh": "Ignored for CI", "PKSA-wdyb-c3m7-9v88": "Ignored for CI"}'
14+
RUN composer install --prefer-dist
15+
16+
FROM extdn/magento-integration-tests-action:7.4-latest
17+
COPY --from=builder /var/www/magento2ce/ /m2/
18+
RUN echo memory_limit = -1 >> /usr/local/etc/php/conf.d/custom-memory.ini
19+
COPY phpunit.phpmd.xml /m2/dev/tests/static/phpunit.phpmd.xml
20+
COPY PhpmdRunner.php /m2/dev/tests/static/testsuite/Magento/Test/Php/PhpmdRunner.php
21+
COPY LiveCodePhpmdRunner.php /m2/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/LiveCodePhpmdRunner.php
22+
23+
COPY entrypoint.sh /entrypoint.sh
24+
ENTRYPOINT ["/entrypoint.sh"]

0 commit comments

Comments
 (0)