Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compressed Size Action configuration #2970

Merged
merged 12 commits into from
Mar 16, 2021
Merged

Conversation

aaemnnosttv
Copy link
Collaborator

@aaemnnosttv aaemnnosttv commented Mar 16, 2021

Summary

Addresses issue #2539 (follow-up)

Relevant technical choices

  • Moves the compressed size check to its own workflow as it currently only works for PRs
    • Included built CSS files in report
    • Scoped workflow to only run when source assets or config files change
    • Added condition to only run on non-drafts
    • This makes sense due to the runtime of this job which runs NPM install and the build two times: once for the current branch and once for the base branch to generate a diff
  • Scopes the analyzed files to dist/assets only (this excludes some insignificant files in the dist root such as JS files generated for scss inputs)
  • Adds strip-hash configuration to allow comparing of built files since hashes will always differ
  • Configures hash to be replaced by asterisks rather than be completely stripped to differentiate between files that have a hash and those that don't

Checklist

  • My code is tested and passes existing unit tests.
  • My code has an appropriate set of unit tests which all pass.
  • My code is backward-compatible with WordPress 4.7 and PHP 5.6.
  • My code follows the WordPress coding standards.
  • My code has proper inline documentation.
  • I have added a QA Brief on the issue linked above.
  • I have signed the Contributor License Agreement (see https://cla.developers.google.com/).

@google-cla google-cla bot added the cla: yes label Mar 16, 2021
@github-actions
Copy link

Size Change: 0 B

Total Size: 1.22 MB

ℹ️ View Unchanged
Filename Size Change
./dist/assets/css/admin.css 36 kB 0 B
./dist/assets/css/adminbar.css 7.3 kB 0 B
./dist/assets/css/wpdashboard.css 4.37 kB 0 B
./dist/assets/js/analytics-advanced-tracking.js 769 B 0 B
./dist/assets/js/googlesitekit-activation.6ad8e76915f289873c73.js 39.8 kB 0 B
./dist/assets/js/googlesitekit-adminbar.3540e941e1f3bd566fb2.js 64.5 kB 0 B
./dist/assets/js/googlesitekit-api.dfa497c8afe75d4ef73f.js 8.4 kB 0 B
./dist/assets/js/googlesitekit-base.3c330fef2361a3259ff7.js 1.57 kB 0 B
./dist/assets/js/googlesitekit-dashboard-details.76a9d0b9f5d92d2e8fbb.js 82.4 kB 0 B
./dist/assets/js/googlesitekit-dashboard-splash.08401b234e16c61d074c.js 53.6 kB 0 B
./dist/assets/js/googlesitekit-dashboard.348cbecb001be51d5798.js 83 kB 0 B
./dist/assets/js/googlesitekit-data.379e174a3452c48d4179.js 1.52 kB 0 B
./dist/assets/js/googlesitekit-datastore-forms.8919ce8466686d194d0a.js 8.07 kB 0 B
./dist/assets/js/googlesitekit-datastore-location.dec28028ffcb4c3cc17c.js 1.02 kB 0 B
./dist/assets/js/googlesitekit-datastore-site.f66d6fecd9d2d1e29087.js 11.5 kB 0 B
./dist/assets/js/googlesitekit-datastore-ui.05212cc07ca890086e44.js 8.04 kB 0 B
./dist/assets/js/googlesitekit-datastore-user.44929af54566570e2d77.js 16.3 kB 0 B
./dist/assets/js/googlesitekit-i18n.js 3.92 kB 0 B
./dist/assets/js/googlesitekit-module.a500afccd1337515fd4e.js 83.2 kB 0 B
./dist/assets/js/googlesitekit-modules-adsense.d252af14413732082759.js 54.1 kB 0 B
./dist/assets/js/googlesitekit-modules-analytics.2455f1a2292e216f2dbb.js 56.8 kB 0 B
./dist/assets/js/googlesitekit-modules-optimize.00c3f306785b0ffa782f.js 16.3 kB 0 B
./dist/assets/js/googlesitekit-modules-pagespeed-insights.247d1e6ed04a61f7f66a.js 23.3 kB 0 B
./dist/assets/js/googlesitekit-modules-search-console.23190c773787db198f0b.js 19 kB 0 B
./dist/assets/js/googlesitekit-modules-tagmanager.b7b2db7723df9545b188.js 30.7 kB 0 B
./dist/assets/js/googlesitekit-modules.63956aecf651e115b8dd.js 15.9 kB 0 B
./dist/assets/js/googlesitekit-settings.7f8d4508ebf0a20946e6.js 90.6 kB 0 B
./dist/assets/js/googlesitekit-user-input.a7a3ee1dd3828cdd9d71.js 87.2 kB 0 B
./dist/assets/js/googlesitekit-vendor.728ea34dcfee7d74a2e3.js 234 kB 0 B
./dist/assets/js/googlesitekit-widgets.e27f361c3d62d9047530.js 10.6 kB 0 B
./dist/assets/js/googlesitekit-wp-dashboard.f4a551e88d11ef16499c.js 64.3 kB 0 B
./dist/assets/js/runtime.11204cf5d95ff56353f0.js 763 B 0 B

compressed-size-action

@aaemnnosttv aaemnnosttv marked this pull request as ready for review March 16, 2021 09:10
Copy link
Member

@felixarntz felixarntz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks!

@felixarntz felixarntz merged commit 857b07e into develop Mar 16, 2021
@felixarntz felixarntz deleted the followup/2539-strip-hashes branch March 16, 2021 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants