Revert [50599].

Unprops desrosj.

git-svn-id: https://develop.svn.wordpress.org/branches/5.7@50600 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jonathan Desrosiers 2021-03-26 15:54:07 +00:00
parent 0559bf34cf
commit c2e97f26f4
5 changed files with 65 additions and 81 deletions

View File

@ -1,20 +1,9 @@
name: Code Coverage Report name: Code Coverage Report
on: on:
# Verify
push:
branches:
- master
- trunk
paths:
- '.github/workflows/test-coverage.yml'
- 'phpunit.xml.dist'
- 'tests/phpunit/multisite.xml'
# Once daily at 00:00 UTC. # Once daily at 00:00 UTC.
schedule: schedule:
- cron: '0 0 * * *' - cron: '0 0 * * *'
# Allow manually triggering the workflow.
workflow_dispatch:
env: env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }} PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }}
@ -48,13 +37,9 @@ jobs:
# - Run the PHPUnit tests as a multisite. # - Run the PHPUnit tests as a multisite.
# - Upload the multisite code coverage report to Codecov.io. # - Upload the multisite code coverage report to Codecov.io.
test-coverage-report: test-coverage-report:
name: ${{ matrix.multisite && 'Multisite' || 'Single site' }} report name: Generate a code coverage report
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: ${{ github.repository == 'WordPress/wordpress-develop' }} if: ${{ github.repository == 'WordPress/wordpress-develop' }}
strategy:
fail-fast: false
matrix:
multisite: [ false, true ]
steps: steps:
- name: Configure environment variables - name: Configure environment variables
@ -65,6 +50,9 @@ jobs:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
- name: Checkout the WordPress Importer plugin
run: svn checkout -r 2387243 https://plugins.svn.wordpress.org/wordpress-importer/trunk/ tests/phpunit/data/plugins/wordpress-importer
- name: Log debug information - name: Log debug information
run: | run: |
echo "$GITHUB_REF" echo "$GITHUB_REF"
@ -127,22 +115,18 @@ jobs:
run: npm run env:install run: npm run env:install
- name: Run tests as a single site - name: Run tests as a single site
if: ${{ ! matrix.multisite }}
run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c phpunit.xml.dist --coverage-clover wp-code-coverage-single-clover-${{ github.sha }}.xml run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c phpunit.xml.dist --coverage-clover wp-code-coverage-single-clover-${{ github.sha }}.xml
- name: Upload single site report to Codecov - name: Upload single site report to Codecov
if: ${{ ! matrix.multisite }}
uses: codecov/codecov-action@e156083f13aff6830c92fc5faa23505779fbf649 # v1.2.1 uses: codecov/codecov-action@e156083f13aff6830c92fc5faa23505779fbf649 # v1.2.1
with: with:
file: wp-code-coverage-single-clover-${{ github.sha }}.xml file: wp-code-coverage-single-clover-${{ github.sha }}.xml
flags: single,php flags: single,php
- name: Run tests as a multisite install - name: Run tests as a multisite install
if: ${{ matrix.multisite }}
run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c tests/phpunit/multisite.xml --coverage-clover wp-code-coverage-multisite-clover-${{ github.sha }}.xml run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c tests/phpunit/multisite.xml --coverage-clover wp-code-coverage-multisite-clover-${{ github.sha }}.xml
- name: Upload multisite report to Codecov - name: Upload multisite report to Codecov
if: ${{ matrix.multisite }}
uses: codecov/codecov-action@e156083f13aff6830c92fc5faa23505779fbf649 # v1.2.1 uses: codecov/codecov-action@e156083f13aff6830c92fc5faa23505779fbf649 # v1.2.1
with: with:
file: wp-code-coverage-multisite-clover-${{ github.sha }}.xml file: wp-code-coverage-multisite-clover-${{ github.sha }}.xml

14
package-lock.json generated
View File

@ -16345,9 +16345,9 @@
"dev": true "dev": true
}, },
"nise": { "nise": {
"version": "4.1.0", "version": "4.0.4",
"resolved": "https://registry.npmjs.org/nise/-/nise-4.1.0.tgz", "resolved": "https://registry.npmjs.org/nise/-/nise-4.0.4.tgz",
"integrity": "sha512-eQMEmGN/8arp0xsvGoQ+B1qvSkR73B1nWSCh7nOt5neMCtwcQVYQGdzQMhcNscktTsWB54xnlSQFzOAPJD8nXA==", "integrity": "sha512-bTTRUNlemx6deJa+ZyoCUTRvH3liK5+N6VQZ4NIw90AgDXY6iPnsqplNFf6STcj+ePk0H/xqxnP75Lr0J0Fq3A==",
"dev": true, "dev": true,
"requires": { "requires": {
"@sinonjs/commons": "^1.7.0", "@sinonjs/commons": "^1.7.0",
@ -20530,16 +20530,16 @@
} }
}, },
"sinon": { "sinon": {
"version": "10.0.0", "version": "9.2.4",
"resolved": "https://registry.npmjs.org/sinon/-/sinon-10.0.0.tgz", "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.2.4.tgz",
"integrity": "sha512-XAn5DxtGVJBlBWYrcYKEhWCz7FLwZGdyvANRyK06419hyEpdT0dMc5A8Vcxg5SCGHc40CsqoKsc1bt1CbJPfNw==", "integrity": "sha512-zljcULZQsJxVra28qIAL6ow1Z9tpattkCTEJR4RBP3TGc00FcttsP5pK284Nas5WjMZU5Yzy3kAIp3B3KRf5Yg==",
"dev": true, "dev": true,
"requires": { "requires": {
"@sinonjs/commons": "^1.8.1", "@sinonjs/commons": "^1.8.1",
"@sinonjs/fake-timers": "^6.0.1", "@sinonjs/fake-timers": "^6.0.1",
"@sinonjs/samsam": "^5.3.1", "@sinonjs/samsam": "^5.3.1",
"diff": "^4.0.2", "diff": "^4.0.2",
"nise": "^4.1.0", "nise": "^4.0.4",
"supports-color": "^7.1.0" "supports-color": "^7.1.0"
}, },
"dependencies": { "dependencies": {

View File

@ -66,10 +66,10 @@
"puppeteer": "npm:puppeteer-core@3.0.0", "puppeteer": "npm:puppeteer-core@3.0.0",
"qunit": "~2.14.1", "qunit": "~2.14.1",
"sass": "^1.32.8", "sass": "^1.32.8",
"sinon": "~10.0.0", "sinon": "~9.2.4",
"sinon-test": "~3.0.0", "sinon-test": "~3.0.0",
"source-map-loader": "^1.1.3", "source-map-loader": "^1.1.3",
"uglify-js": "^3.13.2", "uglify-js": "^3.13.1",
"uglifyjs-webpack-plugin": "2.2.0", "uglifyjs-webpack-plugin": "2.2.0",
"uuid": "8.3.2", "uuid": "8.3.2",
"wait-on": "5.3.0", "wait-on": "5.3.0",

View File

@ -42,38 +42,38 @@
</listeners> </listeners>
<filter> <filter>
<whitelist addUncoveredFilesFromWhitelist="true"> <whitelist addUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src</directory> <directory suffix=".php">build</directory>
<exclude> <exclude>
<!-- Third party library exclusions. --> <!-- Third party library exclusions. -->
<directory suffix=".php">src/wp-includes/ID3</directory> <directory suffix=".php">build/wp-includes/ID3</directory>
<directory suffix=".php">src/wp-includes/IXR</directory> <directory suffix=".php">build/wp-includes/IXR</directory>
<directory suffix=".php">src/wp-includes/random_compat</directory> <directory suffix=".php">build/wp-includes/random_compat</directory>
<directory suffix=".php">src/wp-includes/PHPMailer</directory> <directory suffix=".php">build/wp-includes/PHPMailer</directory>
<directory suffix=".php">src/wp-includes/Requests</directory> <directory suffix=".php">build/wp-includes/Requests</directory>
<directory suffix=".php">src/wp-includes/SimplePie</directory> <directory suffix=".php">build/wp-includes/SimplePie</directory>
<directory suffix=".php">src/wp-includes/sodium_compat</directory> <directory suffix=".php">build/wp-includes/sodium_compat</directory>
<directory suffix=".php">src/wp-includes/Text</directory> <directory suffix=".php">build/wp-includes/Text</directory>
<!-- Plugins and themes. --> <!-- Plugins and themes. -->
<directory suffix=".php">src/wp-content/</directory> <directory suffix=".php">build/wp-content/</directory>
<file>src/wp-admin/includes/class-ftp*</file> <file>build/wp-admin/includes/class-ftp*</file>
<file>src/wp-admin/includes/class-pclzip.php</file> <file>build/wp-admin/includes/class-pclzip.php</file>
<file>src/wp-admin/includes/deprecated.php</file> <file>build/wp-admin/includes/deprecated.php</file>
<file>src/wp-admin/includes/ms-deprecated.php</file> <file>build/wp-admin/includes/ms-deprecated.php</file>
<file>src/wp-includes/atomlib.php</file> <file>build/wp-includes/atomlib.php</file>
<file>src/wp-includes/class-IXR.php</file> <file>build/wp-includes/class-IXR.php</file>
<file>src/wp-includes/class-json.php</file> <file>build/wp-includes/class-json.php</file>
<file>src/wp-includes/class-phpass.php</file> <file>build/wp-includes/class-phpass.php</file>
<file>src/wp-includes/class-pop3.php</file> <file>build/wp-includes/class-pop3.php</file>
<file>src/wp-includes/class-requests.php</file> <file>build/wp-includes/class-requests.php</file>
<file>src/wp-includes/class-simplepie.php</file> <file>build/wp-includes/class-simplepie.php</file>
<file>src/wp-includes/class-snoopy.php</file> <file>build/wp-includes/class-snoopy.php</file>
<file>src/wp-includes/deprecated.php</file> <file>build/wp-includes/deprecated.php</file>
<file>src/wp-includes/ms-deprecated.php</file> <file>build/wp-includes/ms-deprecated.php</file>
<file>src/wp-includes/pluggable-deprecated.php</file> <file>build/wp-includes/pluggable-deprecated.php</file>
<file>src/wp-includes/rss.php</file> <file>build/wp-includes/rss.php</file>
</exclude> </exclude>
</whitelist> </whitelist>
</filter> </filter>

View File

@ -41,38 +41,38 @@
</listeners> </listeners>
<filter> <filter>
<whitelist addUncoveredFilesFromWhitelist="true"> <whitelist addUncoveredFilesFromWhitelist="true">
<directory suffix=".php">../../src</directory> <directory suffix=".php">../../build</directory>
<exclude> <exclude>
<!-- Third party library exclusions. --> <!-- Third party library exclusions. -->
<directory suffix=".php">../../src/wp-includes/ID3</directory> <directory suffix=".php">../../build/wp-includes/ID3</directory>
<directory suffix=".php">../../src/wp-includes/IXR</directory> <directory suffix=".php">../../build/wp-includes/IXR</directory>
<directory suffix=".php">../../src/wp-includes/random_compat</directory> <directory suffix=".php">../../build/wp-includes/random_compat</directory>
<directory suffix=".php">../../src/wp-includes/PHPMailer</directory> <directory suffix=".php">../../build/wp-includes/PHPMailer</directory>
<directory suffix=".php">../../src/wp-includes/Requests</directory> <directory suffix=".php">../../build/wp-includes/Requests</directory>
<directory suffix=".php">../../src/wp-includes/SimplePie</directory> <directory suffix=".php">../../build/wp-includes/SimplePie</directory>
<directory suffix=".php">../../src/wp-includes/sodium_compat</directory> <directory suffix=".php">../../build/wp-includes/sodium_compat</directory>
<directory suffix=".php">../../src/wp-includes/Text</directory> <directory suffix=".php">../../build/wp-includes/Text</directory>
<!-- Plugins and themes. --> <!-- Plugins and themes. -->
<directory suffix=".php">../../src/wp-content/</directory> <directory suffix=".php">../../build/wp-content/</directory>
<file>../../src/wp-admin/includes/class-ftp*</file> <file>../../build/wp-admin/includes/class-ftp*</file>
<file>../../src/wp-admin/includes/class-pclzip.php</file> <file>../../build/wp-admin/includes/class-pclzip.php</file>
<file>../../src/wp-admin/includes/deprecated.php</file> <file>../../build/wp-admin/includes/deprecated.php</file>
<file>../../src/wp-admin/includes/ms-deprecated.php</file> <file>../../build/wp-admin/includes/ms-deprecated.php</file>
<file>../../src/wp-includes/atomlib.php</file> <file>../../build/wp-includes/atomlib.php</file>
<file>../../src/wp-includes/class-IXR.php</file> <file>../../build/wp-includes/class-IXR.php</file>
<file>../../src/wp-includes/class-json.php</file> <file>../../build/wp-includes/class-json.php</file>
<file>../../src/wp-includes/class-phpass.php</file> <file>../../build/wp-includes/class-phpass.php</file>
<file>../../src/wp-includes/class-pop3.php</file> <file>../../build/wp-includes/class-pop3.php</file>
<file>../../src/wp-includes/class-requests.php</file> <file>../../build/wp-includes/class-requests.php</file>
<file>../../src/wp-includes/class-simplepie.php</file> <file>../../build/wp-includes/class-simplepie.php</file>
<file>../../src/wp-includes/class-snoopy.php</file> <file>../../build/wp-includes/class-snoopy.php</file>
<file>../../src/wp-includes/deprecated.php</file> <file>../../build/wp-includes/deprecated.php</file>
<file>../../src/wp-includes/ms-deprecated.php</file> <file>../../build/wp-includes/ms-deprecated.php</file>
<file>../../src/wp-includes/pluggable-deprecated.php</file> <file>../../build/wp-includes/pluggable-deprecated.php</file>
<file>../../src/wp-includes/rss.php</file> <file>../../build/wp-includes/rss.php</file>
</exclude> </exclude>
</whitelist> </whitelist>
</filter> </filter>