Skip to content

Commit 1d94db4

Browse files
committed
test matrix
1 parent 7cad560 commit 1d94db4

File tree

2 files changed

+45
-24
lines changed

2 files changed

+45
-24
lines changed

.github/workflows/playwright.yml

Lines changed: 45 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,56 @@ jobs:
88
test:
99
timeout-minutes: 60
1010
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
include:
14+
# - php_version: 5.6
15+
# wp_version: null
16+
17+
- php_version: 7.3
18+
wp_version: null
19+
20+
# - php_version: 8.2
21+
# wp_version: 6.4.5
22+
23+
# - php_version: 8.2
24+
# wp_version: 6.5.5
25+
26+
- php_version: 8.2
27+
wp_version: 6.6.2
28+
29+
- php_version: 8.2
30+
wp_version: null
31+
1132
steps:
1233
- uses: actions/checkout@v4
1334
- uses: actions/setup-node@v4
1435
with:
1536
node-version: lts/*
1637
- name: Set the version suffix for the output
1738
run: echo VERSION_SUFFIX=${GITHUB_REF_NAME//\//-} >> $GITHUB_ENV
39+
- name: Set WP Version and create .wp-env.json
40+
run: |
41+
WP_VERSION="${{ matrix.wp_version }}"
42+
core="Wordpress/Wordpress#${{ matrix.wp_version }}"
43+
44+
if [[ -z "$WP_VERSION" || "$WP_VERSION" == "null" ]]; then
45+
WP_VERSION="Latest"
46+
core=null
47+
fi
48+
49+
echo "WP_VERSION=$WP_VERSION" >> $GITHUB_ENV
50+
51+
echo '{
52+
"core": $core,
53+
"phpVersion": "${{ matrix.php_version }}"
54+
"plugins": [ "." ],
55+
"config": {
56+
"SCRIPT_DEBUG": false
57+
}
58+
}' > .wp-env.json
59+
60+
cat .wp-env.json
1861
- name: Build Stackable Free Plugin
1962
run: |
2063
npm ci --legacy-peer-deps
@@ -39,21 +82,6 @@ jobs:
3982
if: ${{ !cancelled() }}
4083
with:
4184
filepath: ./playwright-errors/errors.md
42-
- name: Get trace files
43-
id: get-trace-files
44-
if: ${{ !cancelled() }}
45-
run: |
46-
IDS=$(cat ./playwright-errors/testIds.json)
47-
TRACES=$(cat ./playwright-errors/traceFiles.json)
48-
echo "testIds=$IDS" >> $GITHUB_OUTPUT
49-
echo "traceFiles=$TRACES" >> $GITHUB_OUTPUT
50-
- uses: BToersche/upload-artifact@5442a4e8a3867a1c14be1ee3a04c4f47b261d632
51-
id: upload-traces
52-
if: ${{ !cancelled() }}
53-
with:
54-
name: '${{ steps.get-trace-files.outputs.testIds }}'
55-
path: '${{ steps.get-trace-files.outputs.traceFiles }}'
56-
retention-days: 1
5785
- uses: actions/upload-artifact@v4
5886
if: ${{ !cancelled() }}
5987
id: artifact-upload-step
@@ -69,7 +97,7 @@ jobs:
6997
with:
7098
issue-number: ${{ github.event.pull_request.number }}
7199
comment-author: 'github-actions[bot]'
72-
body-includes: Playwright Report Artifact
100+
body-includes: Playwright Report Artifact for PHP ${{ matrix.php_version }} and WP ${{ env.WP_VERSION }}
73101
- name: Create or update comment
74102
uses: peter-evans/create-or-update-comment@v4
75103
if: ${{ !cancelled() }}
@@ -78,7 +106,7 @@ jobs:
78106
issue-number: ${{ github.event.pull_request.number }}
79107
body: |
80108
${{ steps.mto.outputs.body }}
81-
## Playwright Report Artifact
109+
## Playwright Report Artifact for PHP ${{ matrix.php_version }} and WP ${{ env.WP_VERSION }}
82110
| file | commit |
83111
| ---- | ------ |
84112
| [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 }} |

.wp-env.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)