Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion .github/workflows/playwright-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,34 @@ jobs:
run: npm run build

- name: Install Playwright Browsers
timeout-minutes: 5
run: npx playwright install --with-deps chromium

- name: Start WordPress environment
- name: Cache Docker images
id: docker-cache
uses: actions/cache@v4
with:
path: /tmp/docker-images
key: docker-wp-env-${{ hashFiles('.wp-env.json') }}

- name: Load Docker images
if: steps.docker-cache.outputs.cache-hit == 'true'
run: docker load < /tmp/docker-images/images.tar

- name: Start wp-env
run: npm run wp-env start

- name: Wait for WordPress to be ready
run: |
timeout 60 bash -c 'until curl -sSf http://localhost:8889 > /dev/null 2>&1; do sleep 2; done' || echo "WordPress may not be fully ready"
sleep 5

- name: Save Docker images
if: steps.docker-cache.outputs.cache-hit != 'true'
run: |
mkdir -p /tmp/docker-images
docker save $(docker image ls -q) -o /tmp/docker-images/images.tar

- name: Debug - Check WordPress status
run: |
curl -I http://localhost:8889 || echo "WordPress not responding"
Expand Down
Loading
Loading