Changeset 50635 for branches/4.8/.github/workflows/phpunit-tests.yml
- Timestamp:
- 04/02/2021 03:24:27 PM (3 years ago)
- Location:
- branches/4.8
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.8
- Property svn:mergeinfo changed
/trunk merged: 50379,50387,50413,50416,50432,50435-50436,50444,50446,50473-50474,50476,50479,50485-50487,50545,50579,50590
- Property svn:mergeinfo changed
-
branches/4.8/.github/workflows/phpunit-tests.yml
r50332 r50635 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.1' ] 133 phpunit: [ '6-php-7.1' ] 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: 143 # Additional "slow" jobs for PHP 5.6. 144 - php: '5.6' 145 phpunit: '4-php-5.6' 146 os: ubuntu-latest 147 memcached: false 148 multisite: false 149 split_slow: true 150 - php: '5.6' 151 phpunit: '4-php-5.6' 152 os: ubuntu-latest 153 memcached: false 154 multisite: true 155 split_slow: true 156 # Include job for specific PHPUnit versions. 157 - php: '7.1' 158 phpunit: '6-php-7.1' 159 os: ubuntu-latest 160 memcached: false 161 multisite: false 162 split_slow: false 163 - php: '7.1' 164 phpunit: '6-php-7.1' 165 os: ubuntu-latest 166 memcached: false 167 multisite: true 168 split_slow: false 169 - php: '7.0' 170 phpunit: '6-php-7.0' 171 os: ubuntu-latest 172 memcached: false 173 multisite: false 174 split_slow: false 175 - php: '7.0' 176 phpunit: '6-php-7.0' 177 os: ubuntu-latest 178 memcached: false 179 multisite: true 180 split_slow: false 181 - php: '5.6' 182 phpunit: '4-php-5.6' 183 os: ubuntu-latest 184 memcached: false 185 multisite: false 186 split_slow: false 187 - php: '5.6' 188 phpunit: '4-php-5.6' 189 os: ubuntu-latest 190 memcached: false 191 multisite: true 192 split_slow: false 137 193 # Include job for PHP 7.1 with memcached. 138 194 - php: '7.1' … … 140 196 os: ubuntu-latest 141 197 memcached: true 142 - php: '7.0' 143 phpunit: '6-php-7.0' 144 os: ubuntu-latest 145 memcached: false 146 - php: '5.6' 147 phpunit: '4-php-5.6' 148 os: ubuntu-latest 149 memcached: false 150 - php: '5.5' 151 phpunit: '5.5' 152 os: ubuntu-latest 153 memcached: false 154 - php: '5.4' 155 phpunit: '5.4' 156 os: ubuntu-latest 157 memcached: false 158 - php: '5.3' 159 phpunit: '5.3' 160 os: ubuntu-latest 161 memcached: false 198 multisite: false 199 split_slow: false 200 162 201 env: 163 202 LOCAL_PHP: ${{ matrix.php }}-fpm 164 LOCAL_PHPUNIT: ${{ matrix.phpunit }}-fpm203 LOCAL_PHPUNIT: ${{ matrix.phpunit && matrix.phpunit || matrix.php }}-fpm 165 204 LOCAL_PHP_MEMCACHED: ${{ matrix.memcached }} 205 PHPUNIT_CONFIG: ${{ matrix.multisite && 'tests/phpunit/multisite.xml' || 'phpunit.xml.dist' }} 166 206 167 207 steps: … … 172 212 173 213 - name: Download the built WordPress artifact 174 uses: actions/download-artifact@ v2214 uses: actions/download-artifact@4a7a711286f30c025902c28b541c10e147a9b843 # v2.0.8 175 215 with: 176 216 name: built-wp-${{ github.sha }} … … 180 220 181 221 - name: Install NodeJS 182 uses: actions/setup-node@ v1222 uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5 183 223 with: 184 224 node-version: 14 185 225 186 226 - name: Use cached Node modules 187 uses: actions/cache@ v2227 uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4 188 228 env: 189 229 cache-name: cache-node-modules … … 192 232 path: ~/.npm 193 233 key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} 194 restore-keys: |195 ${{ runner.os }}-npm-196 234 197 235 - name: Install Dependencies 198 run: np x install-changed --install-command="npm ci"236 run: npm ci 199 237 200 238 - name: Cache Composer dependencies 201 239 if: ${{ env.COMPOSER_INSTALL == true }} 202 uses: actions/cache@ v2240 uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4 203 241 env: 204 242 cache-name: cache-composer-dependencies … … 206 244 path: ${{ steps.composer-cache.outputs.dir }} 207 245 key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} 208 restore-keys: |209 ${{ runner.os }}-php-${{ matrix.php }}-composer-210 246 211 247 - name: Install Composer dependencies … … 253 289 run: npm run env:install 254 290 291 - name: Run slow PHPUnit tests 292 if: ${{ matrix.split_slow }} 293 run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c ${{ env.PHPUNIT_CONFIG }} --group ${{ env.SLOW_TESTS }} 294 295 - name: Run PHPUnit tests for single site excluding slow tests 296 if: ${{ matrix.php < '7.0' && ! matrix.split_slow && ! matrix.multisite }} 297 run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c ${{ env.PHPUNIT_CONFIG }} --exclude-group ${{ env.SLOW_TESTS }},ajax,ms-files,ms-required 298 299 - name: Run PHPUnit tests for Multisite excluding slow tests 300 if: ${{ matrix.php < '7.0' && ! matrix.split_slow && matrix.multisite }} 301 run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c ${{ env.PHPUNIT_CONFIG }} --exclude-group ${{ env.SLOW_TESTS }},ajax,ms-files,ms-excluded,oembed-headers 302 255 303 - name: Run PHPUnit tests 256 run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c phpunit.xml.dist 304 if: ${{ matrix.php >= '7.0' }} 305 run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c ${{ env.PHPUNIT_CONFIG }} 257 306 258 307 - name: Run AJAX tests 259 run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c phpunit.xml.dist --group ajax 260 261 - name: Run tests as a multisite install 262 run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c tests/phpunit/multisite.xml 308 if: ${{ ! matrix.multisite && ! matrix.split_slow }} 309 run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c ${{ env.PHPUNIT_CONFIG }} --group ajax 263 310 264 311 - name: Run ms-files tests as a multisite install 312 if: ${{ matrix.multisite && ! matrix.split_slow }} 265 313 run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c tests/phpunit/multisite.xml --group ms-files 266 314 267 315 - name: Run external HTTP tests 316 if: ${{ ! matrix.multisite && ! matrix.split_slow }} 268 317 run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c phpunit.xml.dist --group external-http 269 270 - name: Run REST API tests271 run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c phpunit.xml.dist --group restapi-jsclient272 318 273 319 - name: Checkout the WordPress Test Reporter 274 320 if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/master' && matrix.report }} 275 uses: actions/checkout@ v2321 uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 276 322 with: 277 323 repository: 'WordPress/phpunit-test-runner'
Note: See TracChangeset
for help on using the changeset viewer.