Enable changelog in .shopware-extension.yml #18
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: Playwright E2E | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| id-token: write | |
| jobs: | |
| e2e: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| env: | |
| # Playwright (the acceptance-test-suite reads SHOPWARE_ADMIN_*). | |
| APP_URL: http://localhost:8000 | |
| SHOPWARE_ADMIN_USERNAME: admin | |
| SHOPWARE_ADMIN_PASSWORD: shopware | |
| # Consumed directly by shopware-cli for the Admin API upload — no config | |
| # file needed (these take precedence over any .shopware-project.yml). | |
| SHOPWARE_CLI_API_URL: http://localhost:8000 | |
| SHOPWARE_CLI_API_USERNAME: admin | |
| SHOPWARE_CLI_API_PASSWORD: shopware | |
| # The demo environment runs as a service container. Its baked-in default | |
| # APP_URL is already http://localhost:8000, matching what we test against, so | |
| # no overrides are needed. The image has no Docker HEALTHCHECK, so readiness | |
| # is polled in a step below rather than via `options: --health-*`. | |
| services: | |
| shopware: | |
| image: ghcr.io/friendsofshopware/shopware-demo-environment:6.7 | |
| ports: | |
| - 8000:8000 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Setup shopware-cli | |
| uses: shopware/shopware-cli-action@v3 | |
| - name: Build extension zip | |
| id: zip | |
| uses: shopwareLabs/build-extension-zip-action@main | |
| with: | |
| output-directory: dist | |
| - name: Wait for Shopware to be ready | |
| run: | | |
| for i in $(seq 1 60); do | |
| code=$(curl -s -o /dev/null -w "%{http_code}" "${APP_URL}/admin" || true) | |
| echo "attempt ${i}: HTTP ${code}" | |
| if [ "${code}" = "200" ]; then exit 0; fi | |
| sleep 5 | |
| done | |
| echo "Shopware did not become ready in time" >&2 | |
| exit 1 | |
| - name: Upload and activate the plugin | |
| run: shopware-cli project extension upload dist/FroshAdminDashboard.zip --activate | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| cache-dependency-path: tests/package-lock.json | |
| - name: Install test dependencies | |
| working-directory: tests | |
| run: npm ci | |
| - name: Install Playwright browser | |
| working-directory: tests | |
| run: npx playwright install --with-deps chromium | |
| - name: Run Playwright tests | |
| working-directory: tests | |
| run: npx playwright test | |
| - name: Upload Playwright report | |
| if: ${{ !cancelled() }} | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: playwright-report | |
| path: tests/playwright-report | |
| retention-days: 14 | |
| - name: Dump Shopware logs on failure | |
| if: failure() | |
| run: | | |
| # Service containers get a generated name; find it by image. | |
| cid=$(docker ps -a --filter "ancestor=ghcr.io/friendsofshopware/shopware-demo-environment:6.7" --format '{{.ID}}' | head -n1) | |
| if [ -n "$cid" ]; then docker logs "$cid"; fi |