Changeset 50624 for branches/5.0/.github/workflows/phpunit-tests.yml
- Timestamp:
- 03/31/2021 07:26:39 PM (4 years ago)
- Location:
- branches/5.0
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.0
- Property svn:mergeinfo changed
/trunk merged: 50267,50379,50387,50413,50416,50432,50435-50436,50444,50446,50473-50474,50476,50479,50485-50487,50545,50579,50590,50598
- Property svn:mergeinfo changed
-
branches/5.0/.github/workflows/phpunit-tests.yml
r50334 r50624 5 5 branches: 6 6 - master 7 - trunk 7 8 - '3.[7-9]' 8 9 - '[4-9].[0-9]' … … 11 12 - '[4-9].[0-9]*' 12 13 pull_request: 14 branches: 15 - master 16 - trunk 17 - '3.[7-9]' 18 - '[4-9].[0-9]' 19 workflow_dispatch: 13 20 # Once weekly On Sundays at 00:00 UTC. 14 21 schedule: … … 22 29 PHPUNIT_SCRIPT: php 23 30 LOCAL_PHP_MEMCACHED: ${{ false }} 31 SLOW_TESTS: 'external-http,media,restapi' 24 32 25 33 jobs: … … 44 52 - name: Cancel previous runs of this workflow (pull requests only) 45 53 if: ${{ github.event_name == 'pull_request' }} 46 uses: styfle/cancel-workflow-action@0.5.0 47 with: 48 access_token: ${{ github.token }} 54 uses: styfle/cancel-workflow-action@3d86a7cc43670094ac248017207be0295edbc31d # v0.8.0 49 55 50 56 - name: Checkout repository 51 uses: actions/checkout@ v257 uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 52 58 53 59 - name: Log debug information … … 65 71 66 72 - name: Install NodeJS 67 uses: actions/setup-node@ v173 uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5 68 74 with: 69 75 node-version: 14 70 76 71 77 - name: Cache NodeJS modules 72 uses: actions/cache@ v278 uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4 73 79 env: 74 80 cache-name: cache-node-modules … … 77 83 path: ~/.npm 78 84 key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} 79 restore-keys: |80 ${{ runner.os }}-npm-81 85 82 86 - name: Install Dependencies 83 run: np x install-changed --install-command="npm ci"87 run: npm ci 84 88 85 89 - name: Build WordPress … … 87 91 88 92 - name: Create ZIP artifact 89 uses: thedoctor0/zip-release@ 0.4.193 uses: thedoctor0/zip-release@a1afcab9c664c9976ac398fa831eac67bed1eb0e # v0.4.1 90 94 with: 91 95 filename: built-wp-${{ github.sha }}.zip … … 93 97 94 98 - name: Upload build artifact 95 uses: actions/upload-artifact@ v299 uses: actions/upload-artifact@e448a9b857ee2131e752b06002bf0e093c65e571 # v2.2.2 96 100 with: 97 101 name: built-wp-${{ github.sha }} … … 125 129 # - todo: Configure Slack notifications for failing tests. 126 130 test-php: 127 name: ${{ matrix.php }}${{ matrix.m emcached && ' with memcached' || '' }} on ${{ matrix.os }}131 name: ${{ matrix.php }}${{ matrix.multisite && ' multisite' || '' }}${{ matrix.split_slow && ' slow tests' || '' }} ${{ matrix.memcached && ' with memcached' || '' }} on ${{ matrix.os }} 128 132 needs: setup-wordpress 129 133 runs-on: ${{ matrix.os }} 130 134 strategy: 135 fail-fast: false 131 136 matrix: 132 php: [ '7.3' ] 133 phpunit: [ '6-php-7.3' ] 137 php: [ '5.3', '5.4', '5.5' ] 134 138 os: [ ubuntu-latest ] 135 139 memcached: [ false ] 140 split_slow: [ false, true ] 141 multisite: [ false, true ] 136 142 include: 137 # Include job for PHP 7.3 with memcached.143 # Include jobs for PHP 7.3 with memcached. 138 144 - php: '7.3' 139 145 phpunit: '6-php-7.3' 140 146 os: ubuntu-latest 141 147 memcached: true 148 split_slow: false 149 multisite: false 150 - php: '7.3' 151 phpunit: '6-php-7.3' 152 os: ubuntu-latest 153 memcached: true 154 split_slow: false 155 multisite: true 156 # Include jobs that require specific versions of PHPUnit. 157 - php: '7.3' 158 phpunit: '6-php-7.3' 159 os: ubuntu-latest 160 memcached: false 161 split_slow: false 162 multisite: false 163 - php: '7.3' 164 phpunit: '6-php-7.3' 165 os: ubuntu-latest 166 memcached: false 167 split_slow: false 168 multisite: true 142 169 - php: '7.2' 143 170 phpunit: '6-php-7.2' 144 171 os: ubuntu-latest 145 172 memcached: false 173 split_slow: false 174 multisite: false 175 - php: '7.2' 176 phpunit: '6-php-7.2' 177 os: ubuntu-latest 178 memcached: false 179 split_slow: false 180 multisite: true 146 181 - php: '7.1' 147 182 phpunit: '6-php-7.1' 148 183 os: ubuntu-latest 149 184 memcached: false 185 split_slow: false 186 multisite: false 187 - php: '7.1' 188 phpunit: '6-php-7.1' 189 os: ubuntu-latest 190 memcached: false 191 split_slow: false 192 multisite: true 150 193 - php: '7.0' 151 194 phpunit: '6-php-7.0' 152 195 os: ubuntu-latest 153 196 memcached: false 197 split_slow: false 198 multisite: false 199 - php: '7.0' 200 phpunit: '6-php-7.0' 201 os: ubuntu-latest 202 memcached: false 203 split_slow: false 204 multisite: true 154 205 - php: '5.6' 155 206 phpunit: '4-php-5.6' 156 207 os: ubuntu-latest 157 208 memcached: false 158 - php: '5.5' 159 phpunit: '5.5' 160 os: ubuntu-latest 161 memcached: false 162 - php: '5.4' 163 phpunit: '5.4' 164 os: ubuntu-latest 165 memcached: false 166 - php: '5.3' 167 phpunit: '5.3' 168 os: ubuntu-latest 169 memcached: false 209 split_slow: false 210 multisite: false 211 - php: '5.6' 212 phpunit: '4-php-5.6' 213 os: ubuntu-latest 214 memcached: false 215 split_slow: false 216 multisite: true 217 # Additional "slow" jobs for PHP 5.6. 218 - php: '5.6' 219 phpunit: '4-php-5.6' 220 os: ubuntu-latest 221 memcached: false 222 split_slow: true 223 multisite: false 224 - php: '5.6' 225 phpunit: '4-php-5.6' 226 os: ubuntu-latest 227 memcached: false 228 split_slow: true 229 multisite: true 230 170 231 env: 171 232 LOCAL_PHP: ${{ matrix.php }}-fpm 172 LOCAL_PHPUNIT: ${{ matrix.phpunit }}-fpm233 LOCAL_PHPUNIT: ${{ matrix.phpunit && matrix.phpunit || matrix.php }}-fpm 173 234 LOCAL_PHP_MEMCACHED: ${{ matrix.memcached }} 235 PHPUNIT_CONFIG: ${{ matrix.multisite && 'tests/phpunit/multisite.xml' || 'phpunit.xml.dist' }} 174 236 175 237 steps: … … 180 242 181 243 - name: Download the built WordPress artifact 182 uses: actions/download-artifact@ v2244 uses: actions/download-artifact@4a7a711286f30c025902c28b541c10e147a9b843 # v2.0.8 183 245 with: 184 246 name: built-wp-${{ github.sha }} … … 188 250 189 251 - name: Install NodeJS 190 uses: actions/setup-node@ v1252 uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5 191 253 with: 192 254 node-version: 14 193 255 194 256 - name: Use cached Node modules 195 uses: actions/cache@ v2257 uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4 196 258 env: 197 259 cache-name: cache-node-modules … … 200 262 path: ~/.npm 201 263 key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} 202 restore-keys: |203 ${{ runner.os }}-npm-204 264 205 265 - name: Install Dependencies 206 run: np x install-changed --install-command="npm ci"266 run: npm ci 207 267 208 268 - name: Cache Composer dependencies 209 269 if: ${{ env.COMPOSER_INSTALL == true }} 210 uses: actions/cache@ v2270 uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4 211 271 env: 212 272 cache-name: cache-composer-dependencies … … 214 274 path: ${{ steps.composer-cache.outputs.dir }} 215 275 key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} 216 restore-keys: |217 ${{ runner.os }}-php-${{ matrix.php }}-composer-218 276 219 277 - name: Install Composer dependencies … … 261 319 run: npm run env:install 262 320 321 - name: Run slow PHPUnit tests 322 if: ${{ matrix.split_slow }} 323 run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c ${{ env.PHPUNIT_CONFIG }} --group ${{ env.SLOW_TESTS }} 324 325 - name: Run PHPUnit tests for single site excluding slow tests 326 if: ${{ matrix.php < '7.0' && ! matrix.split_slow && ! matrix.multisite }} 327 run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c ${{ env.PHPUNIT_CONFIG }} --exclude-group ${{ env.SLOW_TESTS }},ajax,ms-files,ms-required 328 329 - name: Run PHPUnit tests for Multisite excluding slow tests 330 if: ${{ matrix.php < '7.0' && ! matrix.split_slow && matrix.multisite }} 331 run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c ${{ env.PHPUNIT_CONFIG }} --exclude-group ${{ env.SLOW_TESTS }},ajax,ms-files,ms-excluded,oembed-headers 332 263 333 - name: Run PHPUnit tests 264 run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c phpunit.xml.dist 334 if: ${{ matrix.php >= '7.0' }} 335 run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c ${{ env.PHPUNIT_CONFIG }} 265 336 266 337 - name: Run AJAX tests 267 run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c phpunit.xml.dist --group ajax 268 269 - name: Run tests as a multisite install 270 run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c tests/phpunit/multisite.xml 338 if: ${{ ! matrix.multisite && ! matrix.split_slow }} 339 run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c ${{ env.PHPUNIT_CONFIG }} --group ajax 271 340 272 341 - name: Run ms-files tests as a multisite install 342 if: ${{ matrix.multisite && ! matrix.split_slow }} 273 343 run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c tests/phpunit/multisite.xml --group ms-files 274 344 275 345 - name: Run external HTTP tests 346 if: ${{ ! matrix.multisite && ! matrix.split_slow }} 276 347 run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c phpunit.xml.dist --group external-http 277 278 - name: Run REST API tests279 run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c phpunit.xml.dist --group restapi-jsclient280 348 281 349 - name: Checkout the WordPress Test Reporter 282 350 if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/master' && matrix.report }} 283 uses: actions/checkout@ v2351 uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 284 352 with: 285 353 repository: 'WordPress/phpunit-test-runner'
Note: See TracChangeset
for help on using the changeset viewer.