Update main.yml #278
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: m2-actions-test | |
on: [push] | |
jobs: | |
magento2-build: | |
runs-on: ubuntu-latest | |
name: 'm2 tests & build' | |
services: | |
mysql: | |
image: docker://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:1.2.1 | |
ports: | |
- 9200:9200 | |
options: -e="discovery.type=single-node" -e "plugins.security.disabled=true" -e "plugins.security.ssl.http.enabled=false" --health-cmd="curl http://localhost:9200/_cluster/health" --health-interval=10s --health-timeout=5s --health-retries=10 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: 'launch magento2 static test on all code' | |
if: ${{false}} | |
uses: MAD-I-T/magento-actions@v3.31 | |
env: | |
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}} | |
with: | |
process: 'static-test' | |
opensearch: 1 | |
- name: 'Magento coding standard checker' | |
if: (!cancelled()) | |
uses: MAD-I-T/magento-actions@v3.31 | |
env: | |
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}} | |
with: | |
process: 'phpcs-test' | |
extension: 'magento/app/code/Magento/Email' # can be a custom value module in app/code/ dir e.g: Madit/Atos | |
severity: 10 | |
standard: 'Magento2' | |
- name: 'launch magento2 build' | |
if: (!cancelled()) | |
id: build | |
uses: MAD-I-T/magento-actions@v3.31 | |
env: | |
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}} | |
with: | |
process: 'build' | |
opensearch: 1 | |
- name: 'launch security scanner modules' | |
if: (steps.build.outcome == 'success') && (!cancelled()) | |
uses: MAD-I-T/magento-actions@v3.31 | |
env: | |
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}} | |
with: | |
process: 'security-scan-modules' | |
- name: 'launch security scanner files' | |
if: (!cancelled()) | |
uses: MAD-I-T/magento-actions@v3.31 | |
env: | |
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}} | |
with: | |
process: 'security-scan-files' | |
- name: 'mess detector' | |
if: (!cancelled()) | |
uses: MAD-I-T/magento-actions@v3.31 | |
with: | |
process: 'mess-detector' | |
md_src_path: 'app/code/Magento/Email' | |
- name: 'phpstan' | |
if: ${{false}} | |
uses: MAD-I-T/magento-actions@v3.31 | |
with: | |
process: 'phpstan' | |
exec_path: 'app/code/Magento/Email' | |
- name: 'launch magento2 zero downtime deploy with no permission check' | |
if: ${{false}} # if: success() | |
uses: MAD-I-T/magento-actions@v3.31 | |
env: | |
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}} | |
BUCKET_COMMIT: bucket-commit-${{github.sha}}.tar.gz | |
MYSQL_ROOT_PASSWORD: magento | |
MYSQL_DATABASE: magento | |
HOST_DEPLOY_PATH: ${{secrets.STAGE_HOST_DEPLOY_PATH}} | |
HOST_DEPLOY_PATH_BUCKET: ${{secrets.STAGE_HOST_DEPLOY_PATH}}/bucket | |
SSH_PRIVATE_KEY: ${{secrets.STAGE_SSH_PRIVATE_KEY}} | |
SSH_CONFIG: ${{secrets.STAGE_SSH_CONFIG}} | |
WRITE_USE_SUDO: false | |
with: | |
deployer: 'no-permission-check' | |
process: 'deploy-staging' | |
- name: 'unlock deployer if fails' | |
if: ${{false}} # if: failure() || cancelled() | |
uses: MAD-I-T/magento-actions@v3.31 | |
env: | |
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}} | |
BUCKET_COMMIT: bucket-commit-${{github.sha}}.tar.gz | |
MYSQL_ROOT_PASSWORD: magento | |
MYSQL_DATABASE: magento | |
HOST_DEPLOY_PATH: ${{secrets.STAGE_HOST_DEPLOY_PATH}} | |
HOST_DEPLOY_PATH_BUCKET: ${{secrets.STAGE_HOST_DEPLOY_PATH}}/bucket | |
SSH_PRIVATE_KEY: ${{secrets.STAGE_SSH_PRIVATE_KEY}} | |
SSH_CONFIG: ${{secrets.STAGE_SSH_CONFIG}} | |
WRITE_USE_SUDO: false | |
with: | |
process: 'cleanup-staging' | |
- name: 'start zero downtime deploy on production' | |
if: ${{false}} # if: steps.build.outcome == 'success' | |
uses: MAD-I-T/magento-actions@v3.31 | |
env: | |
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}} | |
BUCKET_COMMIT: bucket-commit-${{github.sha}}.tar.gz | |
MYSQL_ROOT_PASSWORD: magento | |
MYSQL_DATABASE: magento | |
HOST_DEPLOY_PATH: ${{secrets.PROD_HOST_DEPLOY_PATH}} | |
HOST_DEPLOY_PATH_BUCKET: ${{secrets.PROD_HOST_DEPLOY_PATH}}/bucket | |
SSH_PRIVATE_KEY: ${{secrets.PROD_SSH_PRIVATE_KEY}} | |
SSH_CONFIG: ${{secrets.PROD_SSH_CONFIG}} | |
WRITE_USE_SUDO: false | |
with: | |
process: 'deploy-production' | |
deployer: 'no-permission-check' | |
- name: 'unlock php deployer if the deployment fails on production' | |
if: ${{false}} #if: failure() || cancelled() | |
uses: MAD-I-T/magento-actions@v3.31 | |
env: | |
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}} | |
BUCKET_COMMIT: bucket-commit-${{github.sha}}.tar.gz | |
MYSQL_ROOT_PASSWORD: magento | |
MYSQL_DATABASE: magento | |
HOST_DEPLOY_PATH: ${{secrets.PROD_HOST_DEPLOY_PATH}} | |
HOST_DEPLOY_PATH_BUCKET: ${{secrets.PROD_HOST_DEPLOY_PATH}}/bucket | |
SSH_PRIVATE_KEY: ${{secrets.PROD_SSH_PRIVATE_KEY}} | |
SSH_CONFIG: ${{secrets.PROD_SSH_CONFIG}} | |
WRITE_USE_SUDO: false | |
with: | |
process: 'cleanup-prod' | |
magento2-integration-test-latest: | |
runs-on: ubuntu-latest | |
name: 'm2 integration test latest' | |
services: | |
mysql: | |
image: docker://mysql:8.0 | |
env: | |
MYSQL_ROOT_PASSWORD: magento | |
MYSQL_DATABASE: magento | |
ports: | |
- 3106:3306 | |
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
rabbitmq: | |
image: docker://rabbitmq:3.9-alpine | |
env: | |
RABBITMQ_DEFAULT_USER: "magento" | |
RABBITMQ_DEFAULT_PASS: "magento" | |
RABBITMQ_DEFAULT_VHOST: "/" | |
ports: | |
- 5672:5672 | |
opensearch: | |
image: opensearchproject/opensearch:1.2.1 | |
ports: | |
- 9200:9200 | |
options: -e="discovery.type=single-node" -e "plugins.security.disabled=true" -e "plugins.security.ssl.http.enabled=false" --health-cmd="curl http://localhost:9200/_cluster/health" --health-interval=10s --health-timeout=5s --health-retries=10 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: 'launch magento2 integration test custom testsuite' | |
if: (!cancelled()) | |
uses: MAD-I-T/magento-actions@v3.31 | |
env: | |
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}} | |
with: | |
process: 'integration-test' | |
testsuite: "Memory Usage Tests" | |
- name: 'integration test class' | |
if: (!cancelled()) | |
uses: MAD-I-T/magento-actions@v3.31 | |
env: | |
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}} | |
with: | |
process: 'integration-test' | |
integration_class: "./testsuite/Magento/MemoryUsageTest.php" | |
- name: 'integration test class filter' | |
if: (!cancelled()) | |
uses: MAD-I-T/magento-actions@v3.31 | |
env: | |
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}} | |
with: | |
process: 'integration-test' | |
integration_class: "./testsuite/Magento/MemoryUsageTest.php" | |
integration_filter: "testAppReinitializationNoMemoryLeak" |