Skip to content

Commit aba59a7

Browse files
committed
update conditions, log wp and php version
1 parent f310faa commit aba59a7

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

.github/workflows/playwright.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,16 @@ jobs:
7171
npm install -g @wordpress/env
7272
- name: Start wp-env
7373
run: wp-env start
74-
- name: Get PHP and WordPress versions
74+
id: start-wp-env
75+
- name: Verify PHP and WP versions running
7576
run: |
76-
docker ps
77-
wp-env logs
77+
CONTAINER_ID=$(docker ps | grep 'tests-wordpress' | awk '{ print $1 }')
78+
echo "Container ID: $CONTAINER_ID"
79+
docker exec $CONTAINER_ID php -v
80+
wp-env run cli grep wp_version wp-includes/version.php
7881
- name: Run playwright tests
79-
if: ${{ !cancelled() }}
82+
if: ${{ steps.start-wp-env.outcome != 'failure' }}
83+
id: run-playwright-tests
8084
env:
8185
WP_BASE_URL: http://localhost:8889
8286
WP_AUTH_STORAGE: wp-auth.json
@@ -85,7 +89,7 @@ jobs:
8589
STACKABLE_SLUG: Stackable/plugin
8690
run: npm run test
8791
- uses: actions/upload-artifact@v4
88-
if: ${{ !cancelled() }}
92+
if: ${{ steps.run-playwright-tests.outcome == 'failure' }}
8993
id: artifact-upload-step
9094
with:
9195
name: playwright-report-php_${{ matrix.php_version }}-wp_${{ env.WP_VERSION }}-${{ env.VERSION_SUFFIX }}

0 commit comments

Comments
 (0)