|
13 | 13 | # Always test the workflow after it's updated. |
14 | 14 | paths: |
15 | 15 | - '.github/actions/setup-wp-cli/**' |
| 16 | + - '.github/actions/run-with-retry/**' |
16 | 17 | - '.github/actions/smoke-check/**' |
17 | 18 | - '.github/workflows/install-testing.yml' |
18 | 19 | - '.version-support-*.json' |
|
21 | 22 | # Always test the workflow when changes are suggested. |
22 | 23 | paths: |
23 | 24 | - '.github/actions/setup-wp-cli/**' |
| 25 | + - '.github/actions/run-with-retry/**' |
24 | 26 | - '.github/actions/smoke-check/**' |
25 | 27 | - '.version-support-*.json' |
26 | 28 | - '.github/workflows/install-testing.yml' |
|
37 | 39 |
|
38 | 40 | # Cancels all previous workflow runs for pull requests that have not completed. |
39 | 41 | concurrency: |
40 | | - # The concurrency group contains the workflow name and the branch name for pull requests |
| 42 | + # The concurrency group contains the workflow name and the pull request number for pull requests |
41 | 43 | # or the commit hash for any other events. |
42 | | - group: ${{ github.workflow }}-${{ inputs.wp-version || github.event_name == 'pull_request' && github.head_ref || github.sha }} |
| 44 | + group: ${{ github.workflow }}-${{ inputs.wp-version || github.event_name == 'pull_request' && github.event.pull_request.number || github.sha }} |
43 | 45 | cancel-in-progress: true |
44 | 46 |
|
45 | 47 | # Disable permissions for all available scopes by default. |
@@ -104,11 +106,16 @@ jobs: |
104 | 106 | - db-version: '9.4' |
105 | 107 | - db-version: '9.5' |
106 | 108 | - db-version: '9.6' |
| 109 | + - db-version: '26.7' |
107 | 110 | # MySQL 9.0+ will not work on PHP 7.2 & 7.3. See https://core.trac.wordpress.org/ticket/61218. |
108 | 111 | - php: '7.2' |
109 | 112 | db-version: '9.7' |
110 | 113 | - php: '7.3' |
111 | 114 | db-version: '9.7' |
| 115 | + - php: '7.2' |
| 116 | + db-version: '26.10' |
| 117 | + - php: '7.3' |
| 118 | + db-version: '26.10' |
112 | 119 |
|
113 | 120 | services: |
114 | 121 | database: |
@@ -138,16 +145,20 @@ jobs: |
138 | 145 | - name: Set up WP-CLI |
139 | 146 | uses: $/.github/actions/setup-wp-cli |
140 | 147 | with: |
141 | | - version: ${{ contains( fromJSON('["5.4", "5.5"]'), matrix.php ) && '2.4.0' || 'latest' }} |
| 148 | + version: ${{ contains( fromJSON('["5.4", "5.5"]'), matrix.php ) && '2.4.0' || contains( fromJSON('["5.6", "7.0", "7.1"]'), matrix.php ) && '2.12.0' || 'latest' }} |
142 | 149 |
|
143 | | - # WP-CLI extracts tarballs with PharData, which truncates paths longer than 100 characters. |
144 | | - # Nightly builds are only available as a zip, which is not affected. |
| 150 | + # WP-CLI 2.x extracts tarballs with PharData, which truncates paths longer than 100 characters. |
| 151 | + # Zip archives are not affected, so download the zip for every version. |
145 | 152 | - name: Download WordPress |
146 | | - run: | |
147 | | - case "${WP_VERSION}" in |
148 | | - nightly|trunk) wp core download --version=nightly ;; |
149 | | - *) curl -fsSL "https://wordpress.org/wordpress-${WP_VERSION}.tar.gz" | tar xz --strip-components=1 ;; |
150 | | - esac |
| 153 | + # WP-CLI requests WordPress from WordPress.org once, so a network error fails the job. |
| 154 | + # It extracts only after a complete download, so a retry starts from an empty directory. |
| 155 | + uses: $/.github/actions/run-with-retry |
| 156 | + with: |
| 157 | + command: | |
| 158 | + case "${WP_VERSION}" in |
| 159 | + nightly|trunk) wp core download --version=nightly ;; |
| 160 | + *) wp core download "https://wordpress.org/wordpress-${WP_VERSION}.zip" ;; |
| 161 | + esac |
151 | 162 | env: |
152 | 163 | WP_VERSION: ${{ inputs.wp-version || 'nightly' }} |
153 | 164 |
|
|
0 commit comments