Skip to content

Commit

Permalink
(chore) add gzip size compression report (#3400)
Browse files Browse the repository at this point in the history
This will report the gzip'd size of the CDN build output on every pull
request, being run via GitHub actions.

* Workflow: only report size of minified files
  • Loading branch information
bradleymackey committed Nov 14, 2021
1 parent 59b8f1f commit ef45496
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/size_report.yml
@@ -0,0 +1,21 @@
# This workflow computes the size of a CDN build's output on all Javascript files.
# Reported file sizes are after the result of gzip compression.
# Compression action used: https://github.com/preactjs/compressed-size-action

name: Size Report (gzip)

on: [pull_request]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Compute Compressed Size
uses: preactjs/compressed-size-action@v2
with:
build-script: "build-cdn"
compression: "gzip"
pattern: "./build/{*.min.js,es/*.min.js,languages/*.min.js,es/languages/*.min.js}"
4 changes: 4 additions & 0 deletions CHANGES.md
Expand Up @@ -15,6 +15,10 @@ Grammars:
- fix(clojure) Remove inconsistent/broken highlighting for metadata
- enh(clojure) Add `punctuation` mode for commas.

Developer Tools:

- (chore) add gzip size compression report (#3400) [Bradley Mackey][]

[Richard Gibson]: https://github.com/gibson042
[Bradley Mackey]: https://github.com/bradleymackey
[Björn Ebbinghaus]: https://github.com/MrEbbinghaus
Expand Down

0 comments on commit ef45496

Please sign in to comment.