mirror of
https://github.com/graycoreio/github-actions-magento2.git
synced 2026-06-08 19:46:41 +00:00
101 lines
3.0 KiB
YAML
101 lines
3.0 KiB
YAML
name: Check Store Test
|
|
|
|
on:
|
|
workflow_dispatch: {}
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- ".github/workflows/_internal-check-store.yaml"
|
|
- ".github/workflows/check-store.yaml"
|
|
- "supported-version/**"
|
|
- "get-magento-version/**"
|
|
- "!**/*.md"
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- ".github/workflows/_internal-check-store.yaml"
|
|
- ".github/workflows/check-store.yaml"
|
|
- "supported-version/**"
|
|
- "get-magento-version/**"
|
|
- "!**/*.md"
|
|
|
|
jobs:
|
|
compute_matrix:
|
|
if: "!startsWith(github.head_ref, 'release-please')"
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
matrix: ${{ steps.supported-version.outputs.matrix }}
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- uses: ./supported-version
|
|
id: supported-version
|
|
with:
|
|
kind: currently-supported
|
|
|
|
prepare-fixture:
|
|
needs: compute_matrix
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix: ${{ fromJSON(needs.compute_matrix.outputs.matrix) }}
|
|
fail-fast: false
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- uses: ./setup-magento
|
|
id: setup-magento
|
|
with:
|
|
php-version: ${{ matrix.php }}
|
|
tools: composer:v${{ matrix.composer }}
|
|
magento_version: ${{ matrix.magento }}
|
|
mode: extension
|
|
|
|
- run: composer update --no-install
|
|
working-directory: ${{ steps.setup-magento.outputs.path }}
|
|
|
|
- uses: ./cache-magento
|
|
with:
|
|
composer_cache_key: ${{ matrix.magento }}
|
|
working-directory: ${{ steps.setup-magento.outputs.path }}
|
|
stamp: true
|
|
|
|
- name: Inspect stamp cache contents
|
|
if: always()
|
|
working-directory: ${{ steps.setup-magento.outputs.path }}
|
|
run: |
|
|
echo "=== top-level vendor/magento ==="
|
|
ls vendor/magento/ 2>/dev/null | head -30 || echo "(no vendor/magento)"
|
|
echo
|
|
echo "=== magento2-base presence ==="
|
|
if [ -d vendor/magento/magento2-base ]; then
|
|
echo "PRESENT — file count: $(find vendor/magento/magento2-base -type f | wc -l)"
|
|
else
|
|
echo "ABSENT (negation worked)"
|
|
fi
|
|
echo
|
|
echo "=== installed.json mentions magento/magento2-base ==="
|
|
grep -c '"name": "magento/magento2-base"' vendor/composer/installed.json 2>/dev/null || echo 0
|
|
|
|
- run: composer install
|
|
working-directory: ${{ steps.setup-magento.outputs.path }}
|
|
|
|
- uses: actions/upload-artifact@v7
|
|
with:
|
|
name: store-fixture-${{ matrix.version }}
|
|
path: |
|
|
${{ steps.setup-magento.outputs.path }}
|
|
!${{ steps.setup-magento.outputs.path }}/vendor
|
|
retention-days: 3
|
|
|
|
check-store:
|
|
needs: [compute_matrix, prepare-fixture]
|
|
strategy:
|
|
matrix: ${{ fromJSON(needs.compute_matrix.outputs.matrix) }}
|
|
fail-fast: false
|
|
uses: ./.github/workflows/check-store.yaml
|
|
with:
|
|
store_artifact_name: store-fixture-${{ matrix.version }}
|
|
path: "_ghamagento/"
|
|
composer_cache_key: ${{ matrix.magento }}
|
|
stamp: true |