Skip to content

Commit c4d8bd4

Browse files
committed
Test diff size (4)
1 parent 27216e5 commit c4d8bd4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.github/generate-dist-files-size-diff.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export function main() {
7272
const base = JSON.parse(process.env.BASE_DIST_FILES);
7373
/** @type {Record<string, {size: number, size_gz: number}>} */
7474
const pr = JSON.parse(process.env.PR_DIST_FILES);
75-
let output = '<h1>📊 Dist packagesFiles size difference</h1>\n\n';
75+
let output = '<h1>📊 Packages dist files size difference</h1>\n\n';
7676

7777
/**
7878
* @type {Map<string, {
@@ -139,7 +139,7 @@ export function main() {
139139
return output;
140140
}
141141

142-
output += 'Thanks for the PR! Here is the difference in size of the dist packagesFiles between the base and the PR.\n';
142+
output += 'Thanks for the PR! Here is the difference in size of the packages dist files between the base branch and the PR.\n';
143143
output += 'Please review the changes and make sure they are expected.\n\n';
144144
output += `<table>
145145
<thead><tr><th>File</th><th>Before (Size / Gzip)</th><th>After (Size / Gzip)</th></tr></thead>

.github/workflows/dist-files-size-diff.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
run: |
2626
set -e
2727
28-
FILES=$(find src -mindepth 2 -path '*/assets/dist/*' \( -name "*.js" -o -name "*.css" \) -not \( -path '*/tests/*' -o -path '*/public/*' -o -path '*/vendor/*' \) | sort | while read -r file; do
28+
FILES=$(find src -mindepth 2 -type f -path '*/assets/dist/*' -not \( -path '*/tests/*' -o -path '*/public/*' -o -path '*/vendor/*' \) | sort | while read -r file; do
2929
echo "{\"$file\": {\"size\": $(wc -c < "$file"), \"size_gz\": $(gzip -c "$file" | wc -c)}}"
3030
done | jq -s 'add' -c)
3131
@@ -38,7 +38,7 @@ jobs:
3838
run: |
3939
set -e
4040
41-
FILES=$(find src -mindepth 2 -path '*/assets/dist/*' \( -name "*.js" -o -name "*.css" \) -not \( -path '*/tests/*' -o -path '*/public/*' -o -path '*/vendor/*' \) | sort | while read -r file; do
41+
FILES=$(find src -mindepth 2 -type f -path '*/assets/dist/*' -not \( -path '*/tests/*' -o -path '*/public/*' -o -path '*/vendor/*' \) | sort | while read -r file; do
4242
echo "{\"$file\": {\"size\": $(wc -c < "$file"), \"size_gz\": $(gzip -c "$file" | wc -c)}}"
4343
done | jq -s 'add' -c)
4444

0 commit comments

Comments
 (0)