|
12 | 12 | fail-fast: false # Ensures the matrix doesn't stop if one job fails |
13 | 13 | matrix: |
14 | 14 | include: |
15 | | - - php_version: 5.6 |
16 | | - wp_version: null |
| 15 | + - php_version: 7.0.0 |
| 16 | + wp_version: 6.4 |
17 | 17 |
|
18 | 18 | - php_version: 7.3 |
19 | 19 | wp_version: null |
|
71 | 71 | npm install -g @wordpress/env |
72 | 72 | - name: Start wp-env |
73 | 73 | run: wp-env start |
| 74 | + - name: Get PHP and WordPress versions |
| 75 | + run: | |
| 76 | + CONTAINER_NAME=$(docker ps --filter "ancestor=wordpress" --format "{{.Names}}") |
| 77 | + echo "PHP Version:" |
| 78 | + docker exec $CONTAINER_NAME php -v |
| 79 | + echo "WordPress Version:" |
| 80 | + docker exec $CONTAINER_NAME wp core version |
74 | 81 | - name: Run playwright tests |
75 | 82 | env: |
76 | 83 | WP_BASE_URL: http://localhost:8889 |
|
79 | 86 | WP_PASSWORD: password |
80 | 87 | STACKABLE_SLUG: Stackable/plugin |
81 | 88 | run: npm run test |
82 | | - - uses: markpatterson27/markdown-to-output@v1 |
83 | | - id: mto |
84 | | - if: ${{ !cancelled() }} |
85 | | - with: |
86 | | - filepath: ./playwright-errors/errors.md |
87 | 89 | - uses: actions/upload-artifact@v4 |
88 | 90 | if: ${{ !cancelled() }} |
89 | 91 | id: artifact-upload-step |
|
92 | 94 | path: playwright-report/ |
93 | 95 | overwrite: true |
94 | 96 | retention-days: 30 |
95 | | - - name: Find Comment |
96 | | - uses: peter-evans/find-comment@v3 |
97 | | - if: ${{ !cancelled() }} |
98 | | - id: fc |
99 | | - with: |
100 | | - issue-number: ${{ github.event.pull_request.number }} |
101 | | - comment-author: 'github-actions[bot]' |
102 | | - body-includes: Playwright Report Artifact for PHP ${{ matrix.php_version }} and WP ${{ env.WP_VERSION }} |
103 | | - - name: Create or update comment |
104 | | - uses: peter-evans/create-or-update-comment@v4 |
105 | | - if: ${{ !cancelled() }} |
106 | | - with: |
107 | | - comment-id: ${{ steps.fc.outputs.comment-id }} |
108 | | - issue-number: ${{ github.event.pull_request.number }} |
109 | | - body: | |
110 | | - ## Playwright Report Artifact for PHP ${{ matrix.php_version }} and WP ${{ env.WP_VERSION }} |
111 | | - | file | commit | |
112 | | - | ---- | ------ | |
113 | | - | [playwright-report-${{ env.VERSION_SUFFIX }}.zip](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts/${{ steps.artifact-upload-step.outputs.artifact-id }}) | ${{ github.sha }} | |
114 | | - ${{ steps.mto.outputs.body }} |
115 | | - edit-mode: replace |
0 commit comments