Skip to:
Content

bbPress.org

Opened 6 years ago

Closed 5 years ago

Last modified 8 months ago

#2542 closed task (fixed)

Modernize trunk with Unit Tests, Travis, and Grunt

Reported by: johnjamesjacoby Owned by:
Milestone: 2.6 Priority: high
Severity: normal Version: 2.0
Component: Tools - Code Improvements Keywords:
Cc: aaron@…

Description (last modified by johnjamesjacoby)

As we start to consider making relatively large changes in queries and tools, we would greatly benefit from having unit tests going forward. Some tickets in upcoming milestones are introducing somewhat monolithic patches that are scary to apply without knowing backwards compatibility can be guaranteed.

Thinking we can clean up what's already been done in BuddyPress, implement it into /trunk for our current development cycle, and continue improving our test coverage over several releases.

We should also introduce Grunt, Travis, and a stub plugin to help existing trunk installations still function.

Attachments (20)

2542.1.diff (65.4 KB) - added by netweb 6 years ago.
2542.2.diff (2.5 KB) - added by netweb 6 years ago.
2542.3.diff (13.4 KB) - added by netweb 6 years ago.
2542.4.diff (2.0 KB) - added by netweb 6 years ago.
2542.5.diff (69.2 KB) - added by netweb 6 years ago.
Include the scss files in the patch ;)
2542.6.diff (10.4 KB) - added by netweb 6 years ago.
2542.7.diff (2.0 KB) - added by netweb 6 years ago.
2542.8.diff (1.5 KB) - added by netweb 6 years ago.
2542.9.diff (431 bytes) - added by netweb 6 years ago.
2542.10.diff (2.4 KB) - added by netweb 6 years ago.
2542.11.diff (3.3 KB) - added by netweb 6 years ago.
2452.12.diff (2.2 KB) - added by netweb 6 years ago.
2542.12-refresh.diff (2.2 KB) - added by netweb 6 years ago.
2542.13.diff (3.2 KB) - added by netweb 6 years ago.
2542.14.diff (612 bytes) - added by netweb 6 years ago.
2542.15.diff (521 bytes) - added by netweb 6 years ago.
README.md.patch (7.1 KB) - added by netweb 5 years ago.
2542.travis.yml.diff (3.4 KB) - added by netweb 5 years ago.
2542.travis.yml.2.diff (3.8 KB) - added by netweb 5 years ago.
2542.travis.yml.3.diff (4.6 KB) - added by netweb 5 years ago.

Download all attachments as: .zip

Change History (100)

@netweb
6 years ago

#2 @netweb
6 years ago

Initial patch forks BuddyPress PHPUnit
Renamed all the things: BP -> BBP | BuddyPress -> bbPress | bp -> bbp etc
testcase.php and factory.php now needs customizing for bbPress and removal of BuddyPress bits.

@netweb
6 years ago

#3 @netweb
6 years ago

Patch 2542.2.diff goes down an alternate route and comes via @tierra/@bpetty

https://github.com/tierra/wordpress-plugin-tests (Jetpack also use this in their GitHub repo)

#4 follow-up: @johnjamesjacoby
6 years ago

The alternate route is a good start. We'll want to write our own installers and tests that are unlikely to be very similar to BuddyPress's at all, considering we're not creating our own tables and such.

We could even go as far as filtering our option values so they don't need to be added to the DB, helping us maintain the environment state across multiple tests if we needed to.

Lots of neat directions our tests can go.

#5 in reply to: ↑ 4 @netweb
6 years ago

Replying to johnjamesjacoby:

The alternate route is a good start. We'll want to write our own installers and tests that are unlikely to be very similar to BuddyPress's at all, considering we're not creating our own tables and such.

We could even go as far as filtering our option values so they don't need to be added to the DB, helping us maintain the environment state across multiple tests if we needed to.

Lots of neat directions our tests can go.

Yes, that all sounds the way to go.

No idea really what I'm doing here besides a general familiarity with PHPUnit and looking at other examples from WP projects such as WP Core, WP-CLI, WP-API, BuddyPress, Jetpack etc for ideas and best practices.

Also as per Boone's info on #buddypress4889 we should be able to bootstrap BP's tests when needed:

Usable by external BP projects (themes, plugins, entire website projects). Say you're building a BuddyPress-dependent plugin, and you want to write unit tests. You'll want two things: that BP is up and running when your tests run (so you'll have access to BP settings, BP functions, BP database tables, etc), and that you have access to BP's testing tools (BP_UnitTestCase, BP's data factories).

@netweb
6 years ago

#6 @netweb
6 years ago

In 2542.3.diff

  • Brings in 'non specific' BuddyPress bits and pieces
  • Sets up the structure/layout of the base PHPUnit config for bbPress.

(Doesn't really actually 'do' anything more than the prev patch, architectural changes only)

#7 @johnjamesjacoby
6 years ago

Good progress. The patch still includes some renamed BuddyPress bits that won't apply. If it's any easier, we can start with the simple version, and bolt the BuddyPress bootstrap code into it.

@netweb
6 years ago

#8 @netweb
6 years ago

In 2542.4.diff, same as 2542.2.diff with a few minor fixes/tweaks

  • Tests to be run have a prefix bbp_ and suffix .php in the folder /tests/testcases/

#9 @johnjamesjacoby
6 years ago

In 5266:

First pass at unit test suite. Props netweb. See #2542.

#10 @johnjamesjacoby
6 years ago

In 5267:

Fix relative path to unit test bootstrap. See #2542.

#11 @johnjamesjacoby
6 years ago

In 5270:

Gruntify bbPress trunk:

  • Move bbPress core files into /src
  • Move tests into /tests/phpunit/
  • Move phpunit.xml into trunk root
  • Introduce Grunt and Travis configuration files
  • Introduce stub bbpress.php to help activate bbPress for existing trunk checkouts
  • See #2542.

#12 @johnjamesjacoby
6 years ago

In 5271:

Gruntify bbPress trunk (part 2):

  • Move bbPress core files into /src
  • Move tests into /tests/phpunit/
  • Move phpunit.xml into trunk root
  • Introduce Grunt and Travis configuration files
  • Introduce stub bbpress.php to help activate bbPress for existing trunk checkouts
  • See #2542.

#13 @johnjamesjacoby
6 years ago

In 5272:

Don't ignore Travis or JSHint configuration files, and add them to root. See #2542.

#14 @johnjamesjacoby
6 years ago

  • Description modified (diff)
  • Priority changed from normal to high
  • Summary changed from Unit Tests to Modernize trunk with Unit Tests, Travis, and Grunt
  • Type changed from defect to task

#15 @johnjamesjacoby
6 years ago

In 5274:

Move includes and templates back into /src directory. See #2542.

#16 @johnjamesjacoby
6 years ago

In 5275:

Put back root files from previous reorg revert. See #2542.

#17 @johnjamesjacoby
6 years ago

In 5276:

Remove duplicate testcases directory from previous merge. See #2542.

#18 @netweb
6 years ago

In 5277:

Remove existing minified CSS, Grunt build process now takes care of this. See #2542.

#19 @netweb
6 years ago

In 5278:

Include .gitignore file for Git based repo. See #2542

#20 @johnjamesjacoby
6 years ago

In 5279:

Update bootstrap path in bootstrap.php for phpunit testing. See #2542.

#21 @johnjamesjacoby
6 years ago

In 5280:

Update phpunit testcases directory path in phpunit.xml. See #2542.

#22 @johnjamesjacoby
6 years ago

In 5281:

Update inline doc in .gitignore. See #2542.

#23 @johnjamesjacoby
6 years ago

In 5282:

Add build directory to svn:ignore. Props netweb. See #2542.

#24 @johnjamesjacoby
6 years ago

In 5283:

In bbp_locate_template() check for WP_USE_THEMES before calling load_template() to avoid warnings when running phpunit tests. See #2542.

#25 @netweb
6 years ago

In 5284:

Remove tests/phpunit/data/.trac-ticket-cache* from .gitignore (only required in WP develop repo). See #2542

@netweb
6 years ago

Include the scss files in the patch ;)

#26 @netweb
6 years ago

In 2542.5.diff:

  • Fixes CSS & JS admin folder path for BBP_RTL_CSS, BBP_LTR_CSS & BBP_JS in Gruntfile.js
  • Removes Mint & Evergreen CSS (including RTL) to use Mint & Evergreen SCSS
  • Adds _admin.scss, _mixins.scss, _variables.scss via (/trunk/src/wp-admin/css/colors) to build our Mint & Evergreen admin themes
  • Adds /includes/admin/styles/evergreen/colors.scss & /includes/admin/styles/mint/colors.scss via MP6 GitHub Repo Changset 2288dcd5b5
  • Adds support in Gruntfile.js to build minified and RTL Mint & Evergreen CSS
  • Adds grunt-sass ~0.10.0 to package.json to build Mint & Evergreen CSS from SCSS source
  • Reinstates minified and SCRIPT_DEBUG support for minified Mint & Evergreen CSS
  • Adds minified and SCRIPT_DEBUG support for admin javascript & frontend javascript

@ToDo Test RTL CSS generated by cssjanus, remove RTL CSS stylesheets and update bbpress-functions.php including minified and SCRIPT_DEBUG support for front end CSS.

#27 @johnjamesjacoby
6 years ago

In 5285:

More Grunt improvements:

  • Fixes CSS & JS admin folder path for BBP_RTL_CSS, BBP_LTR_CSS & BBP_JS in Gruntfile.js
  • Removes Mint & Evergreen CSS (including RTL) to use Mint & Evergreen SCSS
  • Adds _admin.scss, _mixins.scss, _variables.scss via (/trunk/src/wp-admin/css/colors) to build our Mint & Evergreen admin themes
  • Adds /includes/admin/styles/evergreen/colors.scss & /includes/admin/styles/mint/colors.scss via 2288dcd5b5 MP6 GitHub Repo Changset
  • Adds support in Gruntfile.js to build minified and RTL Mint & Evergreen CSS
  • Adds grunt-sass ~0.10.0 to package.json to build Mint & Evergreen CSS from SCSS source
  • Reinstates minified and SCRIPT_DEBUG support for minified Mint & Evergreen CSS
  • Adds minified and SCRIPT_DEBUG support for admin javascript & frontend javascript

Props netweb. See #2542.

#28 @johnjamesjacoby
6 years ago

In 5286:

Smarter build/src toggling for the stub plugin. See #2542.

@netweb
6 years ago

#29 @netweb
6 years ago

In 2542.6.diff:

  • Add RTL, minified and SCRIPT_DEBUG support for bbPress admin CSS.
  • RTL bbPress CSS is now compiled with cssjanus. (bbpress-rtl.css file removed)
  • Add RTL, minified and SCRIPT_DEBUG support for bbPress CSS.

@netweb
6 years ago

#30 @netweb
6 years ago

In 2542.7.diff:

  • Adds grunt-pot to package.json
  • Adds grunt task pot to grunt build and grunt build-release
  • Creates bbpress.pot in /build
  • Checks for string keywords esc_attr__, esc_attr_e, esc_attr_x, esc_html__, esc_html_e, esc_html_x and _nx_noop. Did I miss any?

See this re: empty pot file created https://github.com/stephenharris/grunt-pot/issues/2 (brew install gettext)

It doesn't quite work for me as I'm having trouble installing the gettext dependency in Windows, other than that it appears to work. I was testing it with a dest: BUILD_DIR _ 'pot/', but I only ever got an empty file :(

If it works cool :)

@netweb
6 years ago

#31 @netweb
6 years ago

In 2542.8.diff:

  • Fixes PHPUnit Multisite Tests
  • Fixes grunt build-realease to run all PHPUnit tests when building release package (Single & Multisite)

To run all PHPUnit tests at once use the grunt phpunit or grunt test GruntJS tasks.

@netweb
6 years ago

#32 @netweb
6 years ago

In 2542.9.diff:

  • Add XML output logging for PHPUnit Tests
  • SVN:Ignore the \tests\phpunit\build\* directory/sub-directories

#33 @johnjamesjacoby
6 years ago

In 5287:

Fixes PHPUnit Multisite tests and sets up grunt build-realease to run all PHPUnit tests when building release package (Single & Multisite.) Props netweb. See #2542.

#34 @johnjamesjacoby
6 years ago

In 5288:

Add XML output logging for PHPUnit tests. Props netweb. See #2542.

#35 @johnjamesjacoby
6 years ago

In 5289:

More grunt updates:

  • Add RTL, minified and SCRIPT_DEBUG support for bbPress admin CSS.
  • Add RTL, minified and SCRIPT_DEBUG support for bbPress default theme-compat CSS.
  • RTL bbPress CSS is now compiled with cssjanus. (bbpress-rtl.css file removed)
  • Props netweb. See #2542.

#36 @johnjamesjacoby
6 years ago

In 5290:

Experiment with grunt-pot:

  • Add grunt-pot to package.json
  • Adds grunt task pot to grunt build and grunt build-release
  • Creates bbpress.pot in /build & removes bbpress.pot from /src
  • Checks for the following keywords: __, _e, _x, _n, _ex, _nx, esc_attr__, esc_attr_e, esc_attr_x, esc_html__, esc_html_e, esc_html_x, _nx_noop
  • Props netweb. See #2542.

@netweb
6 years ago

#37 @netweb
6 years ago

In 2542.10.diff:

  • Add _n_noop to grunt-pot keyword check
  • Remove grunt task test as PHPUnit tests are covered by grunt task phpunit
  • Add grunt task jstest to run javascript tasks
  • Add grunt-checktextdomain to package.json to check for missing or incorrect text-domain in gettext functions. See https://www.npmjs.org/package/grunt-checktextdomain
  • Adds grunt task checktextdomain to grunt build-release
  • Checks for the following keywords: __:1,2d, _e:1,2d, _x:1,2c,3d, _n:1,2,4d, _ex:1,2c,3d, _nx:1,2,4c,5d, esc_attr__:1,2d, esc_attr_e:1,2d, esc_attr_x:1,2c,3d, esc_html__:1,2d, esc_html_e:1,2d, esc_html_x:1,2c,3d, _n_noop:1,2,3d, _nx_noop:1,2,3c,4d

#38 @johnjamesjacoby
6 years ago

In 5293:

More Grunt updates:

  • Add _n_noop to grunt-pot keyword check
  • Remove grunt task test as PHPUnit tests are covered by grunt task phpunit
  • Add grunt task jstest to run javascript tasks
  • Add grunt-checktextdomain to package.json to check for missing or incorrect text-domain in gettext functions. See https://www.npmjs.org/package/grunt-checktextdomain
  • Adds grunt task checktextdomain to grunt build-release
  • Checks for the following keywords: __:1,2d, _e:1,2d, _x:1,2c,3d, _n:1,2,4d, _ex:1,2c,3d, _nx:1,2,4c,5d, esc_attr__:1,2d, esc_attr_e:1,2d, esc_attr_x:1,2c,3d, esc_html__:1,2d, esc_html_e:1,2d, esc_html_x:1,2c,3d, _n_noop:1,2,3d, _nx_noop:1,2,3c,4d
  • Props netweb. See #2542.

@netweb
6 years ago

#39 @netweb
6 years ago

In 5294:

More Grunt updates, fixes grunt watch task not RTL'ing or minifying CSS files.

  • Use explicit CSS file names, avoids ambiguous LTR CSS (avoids LTR = *.css including bbpress-rtl.css)
  • Remove cssmin:colors and include Mint and Evergreen CSS minification in cssmin:core
  • Remove cssjanus:colors and include Mint and Evergreen RTL CSS in cssjanus:core
  • Use BUILD_DIR (not SOURCE_DIR) to compile RTL CSS cssjanus
  • Use BUILD_DIR (not SOURCE_DIR) to compile and LTR & RTL minified CSS with cssmin
  • Add Grunt tasks cssjanus:core, cssmin:ltr and cssmin:rtl to grunt watch -> watch:colors task
  • Add Grunt tasks cssmin:ltr and cssmin:rtl to grunt watch -> watch:rtl task
  • Reorders grunt build and grunt build-release tasks to firstly copy bbpress.css, and admin.css, then create Mint and Evergreen CSS using colors , then RTL all the CSS with cssjanus:core, then minify all the CSS with cssmin:ltr and cssmin:rtl
  • Props netweb. See #2542

@netweb
6 years ago

#40 @netweb
6 years ago

In 2452.12.diff:

  • Switch from grunt-pot to grunt-wp-i18n
  • Removes difficult to install gettext/xgettext dependency on Windows

The 2452.12 patch works and creates bbpress.pot in /build/bbpress.pot

I don't think it's the most eloquent configuration and before commiting will await for some feedback on the GitHub issue I raised here https://github.com/blazersix/grunt-wp-i18n/issues/5

#41 @netweb
6 years ago

In 5295:

More Grunt: Switch from grunt-pot to grunt-wp-i18n

  • Remove grunt-pot from package.json
  • Add grunt-wp-i18n to package.json
  • Adds grunt task grunt makebot to grunt build and grunt build-release
  • Creates bbpress.pot in /build
  • Requires fresh npm install to update dependencies
  • Props netweb. See #2542

#42 @netweb
6 years ago

In 5296:

Bump NPM package versions in package.json

@netweb
6 years ago

#43 @netweb
6 years ago

In 2542.13.diff
Setup travis-ci

  • Uses WordPress Git 'develop repo' git://develop.git.wordpress.org/
  • Tests WordPress 3.7.1, 3.8.1 and /trunk (master)
  • Switch from WP_CORE_DIR to WP_DEVELOP_DIR for compat with bbPress PHPUnit bootstrap.php
  • Uses npm install -g grunt-cli to install global grunt-cli task runner
  • Uses npm intsall to install NodeJS dependencies
  • Uses grunt build to build bbPress
  • Add grunt travis Grunt task to Gruntfile.js
  • Uses grunt travis to run the PHPUnit tests on travis-ci

Things are pretty close here for this to go in ToDo:

#44 follow-ups: @johnjamesjacoby
6 years ago

grunt-wp-i18n spits out a ton of notices for me, but appears to compile the bbpress.pot file fine enough. Wonder if there's anything we can contribute upstream.

#45 in reply to: ↑ 44 @netweb
6 years ago

Replying to johnjamesjacoby:

grunt-wp-i18n spits out a ton of notices for me, but appears to compile the bbpress.pot file fine enough. Wonder if there's anything we can contribute upstream.

I noticed these Sunday whilst messing about with travis-ci.

A quick review of the latest travis-ci build https://travis-ci.org/ntwb/bbPress/builds/19937003

  • PHP 5.2 & 5.3 do not spit out the notices
  • PHP 5.4 & 5.5 do.

Upstream is error_reporting(E_ALL);

http://i18n.trac.wordpress.org/browser/tools/trunk/add-textdomain.php#L10
http://i18n.trac.wordpress.org/browser/tools/trunk/not-gettexted.php#L229

@netweb
6 years ago

#46 @netweb
6 years ago

In 2542.14.diff:

  • Remove src/includes/admin/images/index.php
  • Remove src/includes/admin/images/ folder

We're not keeping this for any particular reason are we?

@netweb
6 years ago

#47 @netweb
6 years ago

In 2542.15.diff:

  • Add BBP_EXCLUDED_FILES to grunt copy:files task to exclude files/folders in BBP_EXCLUDED_FILES being copied to /build during grunt build and grunt build-release tasks
  • Add !**/*.scss to BBP_EXCLUDED_FILES list (colors task uses SRC to create Evergreen and Mint CSS)

#48 @netweb
6 years ago

RE: 2542.15.diff: We have no need for the *.scss files in the /build folder , I think?
(WP Core does as there are plugins that use the *.scss files to create new custom admin themes)

#49 follow-up: @netweb
6 years ago

I went through audited the r868674 commit to wp.org /trunk repo to check what is or isn't there what should or should not be there.

This is how 2542.14.diff​ and 2542.15.diff​ came about, aside from these two issues it looks pretty good to me. :)

Was the resulting bbpress.pot source compiled from the grunt build-release task or manually with makebot ?

Trying to ascertain how it ended up with "Last-Translator: JOHN JAMES JACOBY <JJJ@BBPRESS.ORG>\n" ;)

#50 @johnjamesjacoby
6 years ago

In 5307:

Remove the now-empty includes/admin/images directory. Props netweb. See #2542.

#51 @johnjamesjacoby
6 years ago

In 5308:

Don't copy Sass files (or any other excluded files) into /build directory. Props netweb. See #2542.

#52 in reply to: ↑ 49 ; follow-up: @johnjamesjacoby
6 years ago

Replying to netweb:

Was the resulting bbpress.pot source compiled from the grunt build-release task or manually with makebot ?

It was done from grunt build-release and I manually edited bbpress.pot to add my contact info. Happy to put yours (or anyone else's there) if you'd like. ;)

#53 in reply to: ↑ 52 @netweb
6 years ago

Replying to johnjamesjacoby:

Replying to netweb:

Was the resulting bbpress.pot source compiled from the grunt build-release task or manually with makebot ?

It was done from grunt build-release and I manually edited bbpress.pot to add my contact info. Happy to put yours (or anyone else's there) if you'd like. ;)

Cool, I thought/hoped you had made some magical ponies insert it for you ;)

#54 @netweb
5 years ago

In 5323:

Rename PHPUnit config file from phpunit.xml to phpunit.xml.dist

  • PHPUnit supports config files with both these names, but will use phpunit.xml over the .dist version.
  • Renaming our file lets users add/edit their own phpunit.xml without editing a bbPress core file.
  • Hattip djpaul via r8098
  • Props netweb. See #2542

#55 in reply to: ↑ 44 @netweb
5 years ago

Replying to johnjamesjacoby:

grunt-wp-i18n spits out a ton of notices for me, but appears to compile the bbpress.pot file fine enough. Wonder if there's anything we can contribute upstream.

grunt-wp-i18n v0.4.1 Update looks to have addressed this.

That said, I'm not seeing these errors on the Travis CI tests anymore whilst still using v0.4.0

Either or, updating to the latest grunt-wp-i18n v0.4.2 now.

#56 @netweb
5 years ago

In 5326:

More grunt updates:

#57 @netweb
5 years ago

Patching from the command line using grunt patch

Have a diff or a patch file in your working Directory, then run grunt patch.
If multiple files are found, you'll be asked which one to apply.

Enter a ticket number, e.g. grunt patch:15705
Enter a ticket url, e.g. grunt patch:https://core.trac.wordpress.org/ticket/15705
Enter a patch url, e.g. grunt patch:https://core.trac.wordpress.org/attachment/ticket/11817/13711.diff

#58 follow-up: @jorbin
5 years ago

  • Cc aaron@… added

RE: grunt-patch-wordpress. If anyone has any issues running it, feel free to let me know. You can run it with the debug flag and it will give a lot of info that can help with debugging if you do come across any issues. There is a bit of WordPress specific code based on the fact that patches for that are still accepted from http://core.svn.wordpress.org/trunk/ in addition to http://develop.svn.wordpress.org/ and I don't know if it will cause conflicts.

#59 in reply to: ↑ 58 @netweb
5 years ago

Replying to jorbin:

RE: grunt-patch-wordpress. If anyone has any issues running it, feel free to let me know. You can run it with the debug flag and it will give a lot of info that can help with debugging if you do come across any issues. There is a bit of WordPress specific code based on the fact that patches for that are still accepted from http://core.svn.wordpress.org/trunk/ in addition to http://develop.svn.wordpress.org/ and I don't know if it will cause conflicts.

Thanks, will keep an eye on it, we should be quite similar in that we are also using /src and /build and any older patches not using /src should behave similar to WordPress core.svn patches.

I added a couple of extra patches to #2537 for a bit of testing fun, grunt patch:2537

#60 @netweb
5 years ago

In 5327:

Bump NPM package versions in package.json

Edit: Removed personal details, couldn't stop them being hyperlinked
Edit2: That didn't work but the diff says it did :/

Last edited 5 years ago by netweb (previous) (diff)

#61 @netweb
5 years ago

Related #2576: Update phpunit grunt task to not use deprecated util

#62 @netweb
5 years ago

In 5328:

Bump NPM package versions in package.json
"grunt-contrib-cssmin": "~0.7.0" -> "~0.9.0" http://npmjs.org/package/grunt-contrib-cssmin
"grunt-contrib-uglify": "~0.3.0" -> "~0.4.0" http://npmjs.org/package/grunt-contrib-uglify
"grunt-contrib-watch": "~0.5.3" -> "~0.6.1" http://npmjs.org/package/grunt-contrib-watch
"grunt-contrib-jshint": "~0.8.0" -> "~0.9.2" http://npmjs.org/package/grunt-contrib-jshint
"grunt-sass": "~0.10.0" -> "~0.12.0" http://npmjs.org/package/grunt-sass

  • Requires npm install to update packages and dependencies
  • Props netweb. See #2542

#63 @netweb
5 years ago

In 5333:

More grunt updates:

  • Include bbPress version via package.json in the 'banner' of minified CSS & JS files
  • Include current date and time (UTC) in the 'banner' of minified CSS & JS files
  • Props netweb. See #2542

#64 @netweb
5 years ago

In 5339:

Bump NPM package versions in package.json
"grunt-contrib-jshint": "~0.9.2 -> "~0.10.0" http://npmjs.org/package/grunt-contrib-jshint
"grunt-sass": "~0.12.0" -> "~0.12.1" http://npmjs.org/package/grunt-sass

  • Requires npm install to update packages and dependencies
  • Props netweb. See #2542

#65 @netweb
5 years ago

We should have a readme.txt/readme.md/README file in the root of the repo explaining the repo setup:

  • Install instructions Node.js
  • Install instructions Grunt-CLI
  • Instructions to create the bbPress /build
  • Overview of all the available Grunt tasks
  • Instructions to create a release a package for plugins.trac.wordpress.org repo

Maybe add /assets folder for WP plugin repo assets plugins.trac.wordpress.org/browser/bbpress/assets

#66 @johnjamesjacoby
5 years ago

Completely agree about all-of-the-things, except for the assets (they don't change very much, so I'm fine with them being manually curated for the time being.)

#67 @netweb
5 years ago

In 5342:

Use correct PHPUnit configuration file phpunit.xml.dist for Grunt task grunt phpunit

@netweb
5 years ago

#68 @netweb
5 years ago

In README.md.patch​ first pass of a README.md for the root of the repo

Preview in markdown here https://cloudup.com/cJToaYJb7We

#69 @netweb
5 years ago

In 5344:

More Grunt updates

  • Adds uglify:dynamic to grunt uglify so that grunt watch -> watch:js tasks can dynamicly minify Javascript files with the grunt watch task.
  • Improved inline documentation for grunt jshint task.
  • Props netweb. See #2542

#70 @netweb
5 years ago

The latest Travis CI build https://travis-ci.org/ntwb/bbPress/builds/24447073

In 2542.travis.yml.diff​

  • WordPress versions tested: 3.7.3, 3.8.3, 3.9.0(3.9) and master (/trunk)
  • PHP 5.2, 5.3, 5.4, 5.5 & 5.6 beta (5.6 is allowed to fail)
  • Exludes PHP 5.5 WP 3.7.3 build combination that will always fail due to mysqli
  • Uses grunt phpunit to include single and multisite tests
    • (Previously a separate VM instances were spawned for each test in the matrix)
  • Uses git clone --depth=50 as a 'shallow clone' to improve performance of WP's develop repo

#71 @netweb
5 years ago

In 5347:

Update grunt to 0.4.5 now that depreciated Grunt.util.* API is addressed via 2576

#72 @netweb
5 years ago

In 5348:

Update grunt-wp-i18n to 0.4.4
Changelog via https://github.com/blazersix/grunt-wp-i18n/blob/develop/README.md

  • Added the potComments option to change the copyright message.
    • bbPress: Not implementing this at this stage as the current copyright header text is sufficient
  • Added the updateTimestamp option to prevent the POT-Creation-Header from being updated if there aren't any other changes in the POT file.
    • bbPress: Not implementing this at this stage as the default is true and that is fine
  • Requires npm install to update packages and dependencies
  • Props netweb. See #2542

#73 @netweb
5 years ago

In 2542.travis.yml.2.diff​ updates 2542.travis.yml.diff​ detailes per #comment:70 with:

  • Added Grunt task grunt travis to run jshint and phpunit tasks on Travis CI

#74 @netweb
5 years ago

In 5386:

Update grunt-sass to v0.12.1 to 0.13.1 http://npmjs.org/package/grunt-sass
See #2542

#75 @netweb
5 years ago

Summary of outstanding issues to be able to close those ticket:

Last edited 5 years ago by netweb (previous) (diff)

#76 @netweb
5 years ago

In 2542.travis.yml.3.diff​:

  • Switch to a 'shallow' Git clone of the official WordPress Git repo for faster WordPress upstream checkout, timings below
  • The addition of the fast_finish: true flag in the build matrix will mark the build passed or errored as soon as a single build job has failed. Previously the build status was not reported until ALL tests had completed regardless of status.
  • Moves the 'build configuration' to before_install allowing non-bbPress test configuration to report as errored (MySQL database creation, and WordPress Git checkout etc). When a failure occurs in this section the build is marked as errored which is a more accurate description in that the environment we are setting up has failed and not the actual bbPress tests we are testing.
  • Introduces PHP 5.6 and HHVM testing into the build matrix, both of these are allowed to fail in that they will not be included in the overall build job failed, errored, or passed build status. This allows bbPress testing to play nice with these alpha/beta version of PHP/HHVM until stable and officially released.

#77 @johnjamesjacoby
5 years ago

In 5402:

Travis Updates:

  • Switch to a 'shallow' Git clone of the official WordPress Git repo for faster WordPress upstream checkout.
  • The addition of the fast_finish: true flag in the build matrix will mark the build passed or errored as soon as a single build job has failed. Previously the build status was not reported until ALL tests had completed regardless of status.
  • Moves the 'build configuration' to before_install allowing non-bbPress test configuration to report as errored (MySQL database creation, and WordPress Git checkout etc). When a failure occurs in this section the build is marked as errored which is a more accurate description in that the environment we are setting up has failed and not the actual bbPress tests we are testing.
  • Introduces PHP 5.6 and HHVM testing into the build matrix, both of these are allowed to fail in that they will not be included in the overall build job failed, errored, or passed build status. This allows bbPress testing to play nice with these alpha/beta version of PHP/HHVM until stable and officially released.

Props netweb. See #2542.

#78 @johnjamesjacoby
5 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Going to mark this one as resolved. Let's continue to maintain this in new tickets as needed going forward.

Thanks Stephen for your huge effort here.

#79 @johnjamesjacoby
5 years ago

In 5610:

Port PHPUnit testing setup from BuddyPress. More to clean up here later.

Also adds 1 test to check for bbpress() function availability.

See #2542.

#80 @johnjamesjacoby
8 months ago

Assigning all closed & unassigned tickets in the 2.6 milestone to myself.

Note: See TracTickets for help on using tickets.