Skip to content

Commit 76190c7

Browse files
josephperrottAndrewKushnir
authored andcommitted
ci: migrate payload size tracking goldens to the golden directory (angular#36455)
This change is part of a larger effort to migrate all golden type tracking files to a single location. Additionally, this makes it a bit easier to manage file ownership in pullapprove. PR Close angular#36455
1 parent dd049ca commit 76190c7

File tree

9 files changed

+10
-11
lines changed

9 files changed

+10
-11
lines changed

.pullapprove.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -1031,8 +1031,7 @@ groups:
10311031
- *can-be-global-approved
10321032
- >
10331033
contains_any_globs(files, [
1034-
'aio/scripts/_payload-limits.json',
1035-
'integration/_payload-limits.json'
1034+
'goldens/size-tracking/**'
10361035
])
10371036
reviewers:
10381037
users:

aio/scripts/payload.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ source ../scripts/ci/payload-size.sh
1212
# Provide node_modules from aio
1313
NODE_MODULES_BIN=$PROJECT_ROOT/aio/node_modules/.bin/
1414

15-
trackPayloadSize "$target" "dist/*.js" true "${thisDir}/_payload-limits.json"
15+
trackPayloadSize "$target" "dist/*.js" true "$PROJECT_ROOT/goldens/size-tracking/aio-payloads.json"

goldens/BUILD.bazel

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
package(default_visibility = ["//visibility:public"])
22

3+
exports_files([
4+
"size-tracking/integration-payloads.json",
5+
])
6+
37
filegroup(
48
name = "public-api",
59
srcs = glob([

integration/BUILD.bazel

-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
load(":angular_integration_test.bzl", "angular_integration_test")
22

3-
exports_files([
4-
"_payload-limits.json",
5-
])
6-
73
# Some integration ports must be managed manually to be unique and in other
84
# cases the tests are able to select a random free port.
95
#

integration/angular_integration_test.bzl

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,10 @@ def _angular_integration_test(name, **kwargs):
108108
elif commands == "payload_size_tracking":
109109
commands = DEFAULT_COMMANDS + [
110110
"$(rootpath @nodejs//:yarn_bin) build",
111-
"$(rootpath //:scripts/ci/track-payload-size.sh) %s dist/*.js true ${RUNFILES}/angular/$(rootpath //integration:_payload-limits.json)" % name,
111+
"$(rootpath //:scripts/ci/track-payload-size.sh) %s dist/*.js true ${RUNFILES}/angular/$(rootpath //goldens:size-tracking/integration-payloads.json)" % name,
112112
]
113113
data = data + [
114-
"//integration:_payload-limits.json",
114+
"//goldens:size-tracking/integration-payloads.json",
115115
"//:scripts/ci/track-payload-size.sh",
116116
"//:scripts/ci/payload-size.sh",
117117
"//:scripts/ci/payload-size.js",

integration/cli-hello-world-lazy-rollup/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
This test checks bundle sizes when there is a lazy module and experimentalRollupPass is used. It also checks if the `ngDevMode` global variable and string references in `packages/core/src/util/ng_dev_mode.ts` are correctly removed.
44

5-
This test contains a lazy route to ensure `ngDevMode` removal happens even across chunks, and a payload size check in `../_payload-limits.json` to ensure extra code is not retained accidentally.
5+
This test contains a lazy route to ensure `ngDevMode` removal happens even across chunks, and a payload size check in `/goldens/size-tracking/integration-payloads.json` to ensure extra code is not retained accidentally.

integration/cli-hello-world-lazy/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
This test checks bundle sizes when there is a lazy module. It also checks if the `ngDevMode` global variable and string references in `packages/core/src/util/ng_dev_mode.ts` are correctly removed.
44

5-
This test contains a lazy route to ensure `ngDevMode` removal happens even across chunks, and a payload size check in `../_payload-limits.json` to ensure extra code is not retained accidentally.
5+
This test contains a lazy route to ensure `ngDevMode` removal happens even across chunks, and a payload size check in `/goldens/size-tracking/integration-payloads.json` to ensure extra code is not retained accidentally.

0 commit comments

Comments
 (0)