build(deps-dev): bump picomatch from 4.0.3 to 4.0.4 (#14) #44
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| paths-ignore: | |
| - 'docs/**' | |
| jobs: | |
| supported-version: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix: ${{ steps.supported-version.outputs.matrix }} | |
| steps: | |
| - uses: graycoreio/github-actions-magento2/supported-version@v5.1.0 | |
| id: supported-version | |
| supported-version-latest: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix: ${{ steps.supported-version.outputs.matrix }} | |
| steps: | |
| - uses: graycoreio/github-actions-magento2/supported-version@v5.1.0 | |
| id: supported-version | |
| with: | |
| kind: latest | |
| # Test with existing Magento project (user has PHP/Composer locally) | |
| test-existing-project: | |
| needs: supported-version | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJSON(needs.supported-version.outputs.matrix) }} | |
| name: Existing Project ${{ matrix.magento }} | |
| steps: | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Install devcontainer CLI | |
| run: npm install -g @devcontainers/cli | |
| - name: Create Magento project | |
| run: | | |
| composer create-project --no-install \ | |
| --repository-url=https://mirror.mage-os.org/ \ | |
| "${{ matrix.magento }}" test-project | |
| - name: Checkout devcontainer | |
| uses: actions/checkout@v6 | |
| with: | |
| path: test-project/.devcontainer/magento2-devcontainer | |
| - name: Initialize devcontainer configuration | |
| working-directory: test-project | |
| run: | | |
| # Run init.sh - it will auto-detect the Magento version from composer.json | |
| # Just need to provide the devcontainer name (empty = default) | |
| printf '\n' | .devcontainer/magento2-devcontainer/bin/init.sh | |
| # Show the generated config | |
| echo "=== devcontainer.json ===" | |
| cat .devcontainer/devcontainer.json | |
| - name: Build and start devcontainer | |
| working-directory: test-project | |
| run: | | |
| devcontainer up --workspace-folder . | |
| - name: Verify services are running | |
| working-directory: test-project | |
| run: | | |
| echo "Waiting for OpenSearch to be ready..." | |
| timeout 120 bash -c 'until curl -s http://localhost:9200/_cluster/health | grep -q "status"; do sleep 5; done' | |
| echo "OpenSearch is ready" | |
| echo "=== Checking PHP ===" | |
| devcontainer exec --workspace-folder . php -v | |
| echo "=== Checking database ===" | |
| devcontainer exec --workspace-folder . \ | |
| bash -c 'mysql -h db -umagento -pmagento -e "SELECT 1" magento' | |
| echo "=== Checking OpenSearch ===" | |
| devcontainer exec --workspace-folder . \ | |
| bash -c 'curl -s http://opensearch:9200/_cluster/health' | |
| echo "=== Checking RabbitMQ ===" | |
| devcontainer exec --workspace-folder . \ | |
| bash -c 'curl -s -u magento:magento http://rabbitmq:15672/api/overview | head -c 200' | |
| echo "" | |
| echo "=== Checking Redis ===" | |
| devcontainer exec --workspace-folder . \ | |
| bash -c 'redis-cli -h redis ping' | |
| - name: Install Magento dependencies | |
| working-directory: test-project | |
| run: | | |
| devcontainer exec --workspace-folder . composer install | |
| - name: Run setup-install.sh | |
| working-directory: test-project | |
| run: | | |
| echo "=== Generated setup:install command ===" | |
| devcontainer exec --workspace-folder . \ | |
| bash -c '.devcontainer/magento2-devcontainer/bin/setup-install.sh' | |
| echo "" | |
| echo "=== Running Magento setup:install ===" | |
| devcontainer exec --workspace-folder . \ | |
| bash -c '.devcontainer/magento2-devcontainer/bin/setup-install.sh | bash' | |
| - name: Verify Magento installation | |
| working-directory: test-project | |
| run: | | |
| echo "=== Checking Magento version ===" | |
| devcontainer exec --workspace-folder . bin/magento --version | |
| echo "=== Checking Magento status ===" | |
| devcontainer exec --workspace-folder . bin/magento setup:db:status | |
| - name: Show container status | |
| if: always() | |
| working-directory: test-project | |
| run: | | |
| docker ps -a | |
| # Test fresh install (user only has Docker/VS Code, no PHP/Composer) | |
| test-fresh-install: | |
| needs: supported-version-latest | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: ${{ fromJSON(needs.supported-version-latest.outputs.matrix) }} | |
| name: Fresh Install ${{ matrix.magento }} | |
| steps: | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Install devcontainer CLI | |
| run: npm install -g @devcontainers/cli | |
| - name: Checkout devcontainer | |
| uses: actions/checkout@v6 | |
| with: | |
| path: .devcontainer/magento2-devcontainer | |
| - name: Initialize devcontainer configuration | |
| run: | | |
| # Run init.sh - select latest version (default) and default name | |
| printf '\n\n' | .devcontainer/magento2-devcontainer/bin/init.sh | |
| # Show the generated config | |
| echo "=== devcontainer.json ===" | |
| cat .devcontainer/devcontainer.json | |
| - name: Build and start devcontainer | |
| run: | | |
| devcontainer up --workspace-folder . | |
| - name: Verify services are running | |
| run: | | |
| echo "Waiting for OpenSearch to be ready..." | |
| timeout 120 bash -c 'until curl -s http://localhost:9200/_cluster/health | grep -q "status"; do sleep 5; done' | |
| echo "OpenSearch is ready" | |
| echo "=== Checking PHP ===" | |
| devcontainer exec --workspace-folder . php -v | |
| echo "=== Checking database ===" | |
| devcontainer exec --workspace-folder . \ | |
| bash -c 'mysql -h db -umagento -pmagento -e "SELECT 1" magento' | |
| echo "=== Checking OpenSearch ===" | |
| devcontainer exec --workspace-folder . \ | |
| bash -c 'curl -s http://opensearch:9200/_cluster/health' | |
| echo "=== Checking RabbitMQ ===" | |
| devcontainer exec --workspace-folder . \ | |
| bash -c 'curl -s -u magento:magento http://rabbitmq:15672/api/overview | head -c 200' | |
| echo "" | |
| echo "=== Checking Redis ===" | |
| devcontainer exec --workspace-folder . \ | |
| bash -c 'redis-cli -h redis ping' | |
| - name: Create Magento project inside container | |
| run: | | |
| devcontainer exec --workspace-folder . bash -c ' | |
| composer create-project \ | |
| --repository-url=https://mirror.mage-os.org/ \ | |
| "${{ matrix.magento }}" /tmp/magento && \ | |
| cp -r /tmp/magento/. /workspace/ && \ | |
| rm -rf /tmp/magento | |
| ' | |
| - name: Run setup-install.sh | |
| run: | | |
| echo "=== Generated setup:install command ===" | |
| devcontainer exec --workspace-folder . \ | |
| bash -c '.devcontainer/magento2-devcontainer/bin/setup-install.sh' | |
| echo "" | |
| echo "=== Running Magento setup:install ===" | |
| devcontainer exec --workspace-folder . \ | |
| bash -c '.devcontainer/magento2-devcontainer/bin/setup-install.sh | bash' | |
| - name: Verify Magento installation | |
| run: | | |
| echo "=== Checking Magento version ===" | |
| devcontainer exec --workspace-folder . bin/magento --version | |
| echo "=== Checking Magento status ===" | |
| devcontainer exec --workspace-folder . bin/magento setup:db:status | |
| - name: Show container status | |
| if: always() | |
| run: | | |
| docker ps -a |