Skip to content

Merge branch 'next-35207/add-correct-exception' into 'trunk' #247

Merge branch 'next-35207/add-correct-exception' into 'trunk'

Merge branch 'next-35207/add-correct-exception' into 'trunk' #247

Workflow file for this run

name: Playwright Tests
on:
push:
branches: [ trunk ]
permissions:
packages: write
jobs:
docker:
runs-on: ubuntu-latest
if: github.repository == 'shopware/shopware'
env:
SHOPWARE_ADMIN_SKIP_SOURCEMAP_GENERATION: "1"
DATABASE_URL: mysql://root:root@127.0.0.1:3306/root
services:
database:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: root
options: '--mount="type=tmpfs,destination=/var/lib/mysql" --health-cmd="mysqladmin ping -h 127.0.0.1" --health-interval=5s --health-timeout=2s --health-retries=3'
ports:
- "3306:3306"
steps:
-
name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
coverage: none
- uses: actions/setup-node@v4
with:
node-version: 20
-
name: build shopware
run: |
composer setup
echo '**/node_modules' >> .dockerignore
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login into Github Docker Registery
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
-
name: Build and push
uses: docker/build-push-action@v5
if: ${{ !github.ref_protected }}
with:
context: .
push: true
tags: ghcr.io/${{ github.repository }}/ci-e2e:${{ github.run_id }}
file: .gitlab/docker/dev/Dockerfile
- name: Build and push trunk
uses: docker/build-push-action@v5
if: ${{ github.ref_protected }}
with:
context: .
push: true
tags: ghcr.io/${{ github.repository }}/ci-e2e:${{ github.run_id }},ghcr.io/${{ github.repository }}/ci-e2e:${{ github.ref_name }}
file: .gitlab/docker/dev/Dockerfile
playwright:
name: 'Acceptance tests'
runs-on: ubuntu-latest
if: github.repository == 'shopware/shopware'
container:
image: mcr.microsoft.com/playwright:v1.39.0-jammy
needs: docker
env:
APP_URL: http://shopware:8000
services:
# Label used to access the service container
database:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: root
options: '--mount="type=tmpfs,destination=/var/lib/mysql" --health-cmd="mysqladmin ping -h 127.0.0.1" --health-interval=5s --health-timeout=2s --health-retries=3'
ports:
- "3306:3306"
shopware:
image: ghcr.io/${{ github.repository }}/ci-e2e:${{ github.run_id }}
env:
APP_ENV: prod
SHOPWARE_HTTP_CACHE_ENABLED: 0
SHOPWARE_DISABLE_UPDATE_CHECK: "true"
PROJECT_ROOT: /var/www/html
DATABASE_URL: mysql://root:root@database:3306/root
DATABASE_HOST: database
APP_SECRET: def00000bc5acb32b54ff8ee130270586eec0e878f7337dc7a837acc31d3ff00f93a56b595448b4b29664847dd51991b3314ff65aeeeb761a133b0ec0e070433bff08e48
BLUE_GREEN_DEPLOYMENT: 1
APP_URL: http://shopware:8000
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Install dependencies
working-directory: tests/acceptance
run: npm ci
- name: Run your tests
working-directory: tests/acceptance
run: npx playwright test --project=Platform
env:
HOME: /root