feat: implement dynamic score color for toolbar health indicators #967
This file contains hidden or 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: Magento Compatibility Test | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| concurrency: | |
| # Heavy Magento matrix — cancel superseded PR runs to save CI minutes; | |
| # let push/main runs finish so main is always validated directly. | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| permissions: | |
| contents: read | |
| 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-p10 | |
| php-version: "8.3" | |
| - magento-version: 2.4.8-p5 | |
| php-version: "8.4" | |
| - magento-version: 2.4.9 | |
| php-version: "8.5" | |
| services: | |
| mysql: | |
| image: mysql:8.0 | |
| env: | |
| MYSQL_ROOT_PASSWORD: magento | |
| MYSQL_DATABASE: magento | |
| ports: | |
| - 3306:3306 | |
| options: >- | |
| --health-cmd="mysqladmin ping -h 127.0.0.1 -uroot -pmagento --silent" | |
| --health-interval=10s | |
| --health-timeout=5s | |
| --health-retries=10 | |
| --health-start-period=30s | |
| 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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| path: mageforge | |
| - name: Set up Magento | |
| uses: ./mageforge/.github/actions/setup-magento | |
| with: | |
| php-version: ${{ matrix.php-version }} | |
| magento-version: ${{ matrix.magento-version }} | |
| magento-source: git | |
| composer-auth: ${{ secrets.COMPOSER_AUTH }} | |
| - 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:template:override --help | |
| bin/magento mageforge:hyva:compatibility:check --help | |
| bin/magento mageforge:hyva:tokens --help | |
| bin/magento mageforge:dependencies:update --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 template:override --help | |
| bin/magento hyva:check --help | |
| bin/magento hyva:tokens --help | |
| bin/magento dependencies:update --help | |
| - name: Test Summary | |
| run: | | |
| echo "MageForge module compatibility test with Magento ${{ matrix.magento-version }} (PHP ${{ matrix.php-version }}) completed" |