-
Notifications
You must be signed in to change notification settings - Fork 296
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into enhancement/2539-extract-bundlesize.
- Loading branch information
Showing
501 changed files
with
15,892 additions
and
18,439 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: PHP Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
- master | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
|
||
jobs: | ||
php-tests-wp-latest-php-8-0: | ||
name: PHP (PHP 8.0, WordPress Latest) | ||
runs-on: ubuntu-latest | ||
services: | ||
mysql: | ||
image: mysql:5.7 | ||
env: | ||
MYSQL_ALLOW_EMPTY_PASSWORD: yes | ||
ports: | ||
- 3306:3306 | ||
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3 | ||
env: | ||
DB_HOST: 127.0.0.1 | ||
DB_PORT: 3306 | ||
MYSQL_USER: wordpress | ||
MYSQL_PASSWORD: wordpress | ||
MYSQL_DATABASE: wordpress_test | ||
MYSQL_ROOT_PASSWORD: root | ||
WP_VERSION: latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Grant database access | ||
env: | ||
MYSQL_TCP_PORT: ${{ env.DB_PORT }} | ||
run: | | ||
mysql -u root -h ${DB_HOST} -e "CREATE USER ${MYSQL_USER} IDENTIFIED BY '${MYSQL_PASSWORD}';" | ||
mysql -u root -h ${DB_HOST} -e "GRANT ALL PRIVILEGES ON *.* TO ${MYSQL_USER};" | ||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
extensions: mysqli | ||
tools: composer | ||
php-version: '8.0' | ||
- name: Get Composer Cache Directory | ||
id: composer-cache | ||
run: | | ||
echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer- | ||
- name: Composer Install | ||
run: composer install --no-interaction --no-progress | ||
- name: Update PHPUnit | ||
run: composer update phpunit/phpunit --with-dependencies --ignore-platform-reqs --no-scripts | ||
- name: Set up PHP test data | ||
run: tests/bin/install-wp-tests.sh ${MYSQL_DATABASE} ${MYSQL_USER} ${MYSQL_PASSWORD} ${DB_HOST}:${DB_PORT} ${WP_VERSION} | ||
- name: Run Unit Tests | ||
run: composer test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,8 +51,8 @@ const resetGlobals = () => { | |
isFirstAdmin: true, | ||
isOwner: true, | ||
splashURL: 'http://example.com/wp-admin/admin.php?page=googlesitekit-splash', | ||
proxySetupURL: 'https://sitekit.withgoogle.com/site-management/setup/?scope=openid%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fsiteverification%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fwebmasters%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fanalytics%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fanalytics.readonly%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fanalytics.manage.users%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fanalytics.edit&supports=credentials_retrieval%20short_verification_token%20file_verification&nonce=&site_id=storybooksiteid.apps.sitekit.withgoogle.com', | ||
proxyPermissionsURL: 'https://sitekit.withgoogle.com/site-management/permissions/?token=storybooktoken&site_id=storybooksiteid.apps.sitekit.withgoogle.com', | ||
proxySetupURL: 'http://example.com/wp-admin/index.php?action=googlesitekit_proxy_setup&nonce=abc123', | ||
proxyPermissionsURL: 'http://example.com/wp-admin/index.php?action=googlesitekit_proxy_permissions&nonce=abc123', | ||
trackingEnabled: false, | ||
trackingID: 'UA-000000000-1', | ||
}; | ||
|
@@ -62,6 +62,26 @@ const resetGlobals = () => { | |
currentEntityTitle: null, | ||
currentEntityID: null, | ||
}; | ||
global._googlesitekitUserData = { | ||
user: { | ||
id: 1, | ||
name: 'Wapuu WordPress', | ||
email: '[email protected]', | ||
picture: 'https://wapu.us/wp-content/uploads/2017/11/WapuuFinal-100x138.png', | ||
}, | ||
connectURL: 'http://example.com/wp-admin/admin.php?page=googlesitekit-splash&googlesitekit_connect=1&nonce=abc123', | ||
verified: true, | ||
userInputState: 'completed', | ||
permissions: { | ||
googlesitekit_authenticate: true, | ||
googlesitekit_setup: true, | ||
googlesitekit_view_posts_insights: true, | ||
googlesitekit_view_dashboard: true, | ||
googlesitekit_view_module_details: true, | ||
googlesitekit_manage_options: true, | ||
googlesitekit_publish_posts: true, | ||
}, | ||
}; | ||
}; | ||
resetGlobals(); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"search.exclude": { | ||
".storybook/data": true, | ||
"dist/": true, | ||
"node_modules/": true, | ||
"third-party/": true, | ||
"vendor/": true | ||
}, | ||
"files.exclude": { | ||
"dist/": true, | ||
"node_modules/": true, | ||
"third-party/": true, | ||
"vendor/": true | ||
}, | ||
"jest.autoEnable": false, | ||
"jest.pathToConfig": "./tests/js/jest.config.js", | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": true, | ||
"source.fixAll.eslint": true | ||
}, | ||
"phpcs.enable": true, | ||
"phpcs.executablePath": "vendor/bin/phpcs" | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.