Skip to content

Commit

Permalink
Add bundlewatch to .travis.yml
Browse files Browse the repository at this point in the history
GitHub Actions are a bit too problematic, see
#819 (comment)

Remove redundant `npm ci` from `Coding standard check`.
Increase maxSizes of bundles.
  • Loading branch information
tomalec committed Jul 7, 2021
1 parent 9c42641 commit ed9cbc7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@ matrix:
- name: "Coding standard check"
php: 7.4
env: WP_VERSION="${WP_LATEST}" WC_VERSION="${WC_LATEST}" WP_TRAVISCI=cs WP_MULTISITE=0
script: npm ci && npm run lint
script: npm run lint
- name: "Bundle size"
php: 7.4
env: WP_VERSION="${WP_LATEST}" WC_VERSION="${WC_LATEST}" WP_TRAVISCI=cs WP_MULTISITE=0
# We run the production build, to watch also .zip size.
script: npm run build && npx bundlewatch

before_install:
- if [[ "${WP_TRAVISCI}" != "jest" ]]; then composer self-update --1; fi
Expand Down
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,25 +95,28 @@
"files": [
{
"path": "./js/build/*.js",
"maxSize": "2 kB"
"maxSize": "3 kB"
},
{
"path": "./js/build/index.js",
"maxSize": "1 mB"
"maxSize": "3 mB"
},
{
"path": "./js/build/*.css",
"maxSize": "1 kB"
},
{
"path": "./js/build/index.css",
"maxSize": "8 kB"
"maxSize": "10 kB"
},
{
"path": "./google-listings-and-ads.zip",
"maxSize": "12 mB",
"compression": "none"
}
]
],
"ci": {
"trackBranches": ["trunk", "develop"]
}
}
}

0 comments on commit ed9cbc7

Please sign in to comment.