|
8 | 8 | test: |
9 | 9 | timeout-minutes: 60 |
10 | 10 | 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 | + |
11 | 32 | steps: |
12 | 33 | - uses: actions/checkout@v4 |
13 | 34 | - uses: actions/setup-node@v4 |
14 | 35 | with: |
15 | 36 | node-version: lts/* |
16 | 37 | - name: Set the version suffix for the output |
17 | 38 | 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 |
18 | 61 | - name: Build Stackable Free Plugin |
19 | 62 | run: | |
20 | 63 | npm ci --legacy-peer-deps |
|
39 | 82 | if: ${{ !cancelled() }} |
40 | 83 | with: |
41 | 84 | 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 |
57 | 85 | - uses: actions/upload-artifact@v4 |
58 | 86 | if: ${{ !cancelled() }} |
59 | 87 | id: artifact-upload-step |
|
69 | 97 | with: |
70 | 98 | issue-number: ${{ github.event.pull_request.number }} |
71 | 99 | 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 }} |
73 | 101 | - name: Create or update comment |
74 | 102 | uses: peter-evans/create-or-update-comment@v4 |
75 | 103 | if: ${{ !cancelled() }} |
|
78 | 106 | issue-number: ${{ github.event.pull_request.number }} |
79 | 107 | body: | |
80 | 108 | ${{ steps.mto.outputs.body }} |
81 | | - ## Playwright Report Artifact |
| 109 | + ## Playwright Report Artifact for PHP ${{ matrix.php_version }} and WP ${{ env.WP_VERSION }} |
82 | 110 | | file | commit | |
83 | 111 | | ---- | ------ | |
84 | 112 | | [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 }} | |
|
0 commit comments