-
Notifications
You must be signed in to change notification settings - Fork 1
77 lines (63 loc) · 2.16 KB
/
Copy pathshopware-cli.yml
File metadata and controls
77 lines (63 loc) · 2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Run playwright via shopware-cli
on:
workflow_dispatch:
jobs:
visual-admin:
runs-on: ubuntu-24.04
steps:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.2"
- name: Clone shopware/shopware
uses: actions/checkout@v4
with:
repository: shopware/shopware
path: shopware-platform
- name: Install shopware-cli
uses: shopware/shopware-cli-action@v3
- name: Create Shopware project
run: shopware-cli project create swcli latest --no-interaction
- name: Copy compose file and tests directory into swcli
run: |
cp shopware-platform/compose.yaml swcli/compose.yaml
mkdir swcli/tests
cp -R shopware-platform/tests/acceptance swcli/tests/acceptance
- name: Install Playwright dependencies
working-directory: swcli/tests/acceptance
run: npm ci
- name: Optimize for CI
run: shopware-cli project ci swcli
- name: Start Docker services
working-directory: swcli
run: |
docker compose up -d
- name: Debug web container
if: always()
working-directory: swcli
run: |
docker compose ps
docker compose logs web --tail=200
- name: Run visual tests in Playwright container
working-directory: swcli/tests/acceptance
run: |
docker run --rm \
--ipc=host \
--init \
--add-host=host.docker.internal:host-gateway \
-e APP_URL=http://host.docker.internal:8000 \
-e SHOPWARE_ADMIN_USERNAME=admin \
-e SHOPWARE_ADMIN_PASSWORD=shopware \
-v "$GITHUB_WORKSPACE/swcli:/app" \
-w /app/tests/acceptance \
mcr.microsoft.com/playwright:v1.58.1-noble \
npx playwright test --project=Visual
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-test-results
path: |
tests/acceptance/test-results/
tests/acceptance/playwright-report/
retention-days: 3