Skip to content

Commit

Permalink
Monorepo: Restore and add test coverage config (#39961)
Browse files Browse the repository at this point in the history
* Enable and normalize test coverage commands

* Revert "Code Coverage: remove automation (#28542)"

This reverts commit da5e78803f56ea0fe54f29720c05be037093b97a.

* Revert "Remove remnants of automated code coverage support (#28982)"

This reverts commit 8cc32461b2d3b7e3a4a391c033163e5ebc3822fa.

* Fix starter plugin test broken by #31417

* Plugin tests are now run in the monorepo rather than wp-content/plugins.

* Removed undocumented WP_DEVELOP_DIR variable, documented WORDPRESS_DEVELOP_DIR and WORDPRESS_DIR

* Fixed JS tests in some packages where .scripts.test-js had never been added to composer.json.

---------

Co-authored-by: Brad Jorsch <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/11610578911

Upstream-Ref: Automattic/jetpack@7fadf4a
  • Loading branch information
tbradsha authored and matticbot committed Oct 31, 2024
1 parent 7997b25 commit 91323a2
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 12 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.24.16-alpha] - unreleased

This is an alpha version! The changes listed here are not final.

### Added
- Enable test coverage.

## [0.24.15] - 2024-10-29
### Changed
- Components: Add __nextHasNoMarginBottom to BaseControl-based components, preventing deprecation notices. [#39877]
Expand Down Expand Up @@ -1480,6 +1487,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Created empty package [#24952]

[0.24.16-alpha]: https://github.com/Automattic/jetpack-videopress/compare/v0.24.15...v0.24.16-alpha
[0.24.15]: https://github.com/Automattic/jetpack-videopress/compare/v0.24.14...v0.24.15
[0.24.14]: https://github.com/Automattic/jetpack-videopress/compare/v0.24.13...v0.24.14
[0.24.13]: https://github.com/Automattic/jetpack-videopress/compare/v0.24.12...v0.24.13
Expand Down
14 changes: 9 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
"license": "GPL-2.0-or-later",
"require": {
"php": ">=7.0",
"automattic/jetpack-admin-ui": "^0.4.5",
"automattic/jetpack-assets": "^2.3.12",
"automattic/jetpack-connection": "^5.1.5",
"automattic/jetpack-admin-ui": "^0.4.6-alpha",
"automattic/jetpack-assets": "^2.3.13-alpha",
"automattic/jetpack-connection": "^5.1.6-alpha",
"automattic/jetpack-my-jetpack": "^4.36.0-alpha",
"automattic/jetpack-plans": "^0.4.12"
"automattic/jetpack-plans": "^0.4.13-alpha"
},
"require-dev": {
"yoast/phpunit-polyfills": "^1.1.1",
"automattic/jetpack-changelogger": "^4.2.7",
"automattic/jetpack-changelogger": "^4.2.8-alpha",
"automattic/wordbless": "@dev",
"brain/monkey": "2.6.1"
},
Expand All @@ -29,6 +29,10 @@
"phpunit": [
"./vendor/phpunit/phpunit/phpunit --colors=always"
],
"test-coverage": [
"php -dpcov.directory=. ./vendor/bin/phpunit --coverage-clover \"$COVERAGE_DIR/php/clover.xml\"",
"pnpm run test-coverage"
],
"test-php": [
"@composer phpunit"
],
Expand Down
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@automattic/jetpack-videopress",
"version": "0.24.15",
"version": "0.24.16-alpha",
"description": "VideoPress package",
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/packages/videopress/#readme",
"bugs": {
Expand All @@ -20,7 +20,8 @@
"clean": "rm -rf build/",
"validate": "pnpm exec validate-es build/",
"watch": "pnpm build && pnpm build-client --watch",
"test": "NODE_OPTIONS=--experimental-vm-modules jest"
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
"test-coverage": "pnpm run test --coverageDirectory=\"$COVERAGE_DIR/js\" --coverage --coverageReporters=clover"
},
"devDependencies": {
"@automattic/calypso-color-schemes": "3.1.3",
Expand Down Expand Up @@ -56,12 +57,12 @@
"webpack-cli": "4.9.1"
},
"dependencies": {
"@automattic/jetpack-analytics": "^0.1.31",
"@automattic/jetpack-api": "^0.17.15",
"@automattic/jetpack-analytics": "^0.1.32-alpha",
"@automattic/jetpack-api": "^0.17.16-alpha",
"@automattic/jetpack-base-styles": "^0.6.34",
"@automattic/jetpack-components": "^0.58.0",
"@automattic/jetpack-components": "^0.58.1-alpha",
"@automattic/jetpack-connection": "^0.35.15-alpha",
"@automattic/jetpack-shared-extension-utils": "^0.15.14",
"@automattic/jetpack-shared-extension-utils": "^0.15.15-alpha",
"@wordpress/api-fetch": "7.9.0",
"@wordpress/blob": "4.9.0",
"@wordpress/block-editor": "14.4.0",
Expand Down
2 changes: 1 addition & 1 deletion src/class-package-version.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* The Package_Version class.
*/
class Package_Version {
const PACKAGE_VERSION = '0.24.15';
const PACKAGE_VERSION = '0.24.16-alpha';

const PACKAGE_SLUG = 'videopress';

Expand Down

0 comments on commit 91323a2

Please sign in to comment.