Opened 8 years ago
Closed 8 years ago
#7209 closed defect (bug) (fixed)
Fix Travis CI `node_modules` directory cache
Reported by: | netweb | Owned by: | netweb |
---|---|---|---|
Milestone: | 2.7 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Build/Test Tools | Keywords: | |
Cc: |
Description
In r10974 support was added to Travis CI to cache the node_modules
directory
This currently doesn't cache BP's NPM modules as BP doesn't use the standard Travis CI repo layout because of the dependency on WordPress develop repo checkout.
For example: npm install
here still took 104.60s
, whereas the equivalent WordPress here only took 5.84s
I expect the current size of the caches to be quite small as nothing is essentially being cached, after fixing these should be 50-150mb at a guess, caches can be managed at: https://travis-ci.org/buddypress/BuddyPress/caches
Change History (9)
#4
in reply to:
↑ 2
@
8 years ago
Replying to DJPaul:
I think this should be
/tmp/wordpress/src/wp-content/plugins/buddypress/node_modules
@netweb did you assign this ticket to yourself to patch?
Yes, I did, but time got away from me before I was able to patch.
:+1 to /tmp/wordpress/src/wp-content/plugins/buddypress/node_modules
is what I think is required
#6
@
8 years ago
- Keywords needs-patch removed
This broke things.
$ mkdir -p $WP_DEVELOP_DIR $ git clone --depth=1 --branch="$WP_VERSION" git://develop.git.wordpress.org/ $WP_DEVELOP_DIR fatal: destination path '/tmp/wordpress' already exists and is not an empty directory. ```
As the folder /tmp/wordpress/src/wp-content/plugins/buddypress/node_modules
already exists now as it’s restored as part the cache loading, trying to create /tmp/wordpress/
again with mkdir -p $WP_DEVELOP_DIR
causes the fatal.
If we wanted to go ahead with this, I think we'd have to clone into another folder, then move everything back into /tmp/wordpress, but @netweb is giving this some proper thought. For now, I'll revert.
I think this should be
/tmp/wordpress/src/wp-content/plugins/buddypress/node_modules
@netweb did you assign this ticket to yourself to patch?