Skip to content

Commit 708f7fe

Browse files
committed
Test
1 parent b3e027e commit 708f7fe

File tree

10 files changed

+41
-35
lines changed

10 files changed

+41
-35
lines changed

.github/shared-actions/windows-bazel-test/action.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,20 @@ runs:
2222

2323
- name: Initialize WSL
2424
id: init_wsl
25-
uses: angular/dev-infra/github-actions/setup-wsl@1e0e2edff67a23e606df18ac8a25a59249f23a60
25+
uses: angular/dev-infra/github-actions/setup-wsl@75e678df6aff2bccfc6411b83e7f45d72b1f6f90
2626
with:
2727
wsl_firewall_interface: 'vEthernet (WSL (Hyper-V firewall))'
2828

2929
- name: Install node modules in WSL (re-using from previous install/cache restore)
30-
run: yarn install --immutable
31-
working-directory: ${{steps.init_wsl.outputs.repo_path}}
30+
run: |
31+
cd ${{steps.init_wsl.outputs.repo_path}}
32+
yarn install --immutable
3233
shell: wsl-bash {0}
3334

3435
- name: Build test binary for Windows (inside WSL)
3536
shell: wsl-bash {0}
36-
working-directory: ${{steps.init_wsl.outputs.repo_path}}
3737
run: |
38+
cd ${{steps.init_wsl.outputs.repo_path}}
3839
yarn bazel \
3940
build --config=e2e //tests/legacy-cli:${{inputs.test_target_name}} --platforms=tools:windows_x64
4041
env:
@@ -43,17 +44,18 @@ runs:
4344

4445
- name: Copying binary artifact to host
4546
shell: wsl-bash {0}
46-
working-directory: ${{steps.init_wsl.outputs.repo_path}}
4747
run: |
48+
cd ${{steps.init_wsl.outputs.repo_path}}
4849
tar -cf /tmp/test.tar.gz dist/bin/tests/legacy-cli/${{inputs.test_target_name}}_
4950
mkdir /mnt/c/test
5051
mv /tmp/test.tar.gz /mnt/c/test
5152
(cd /mnt/c/test && tar -xf /mnt/c/test/test.tar.gz)
5253
5354
- name: Convert symlinks for Windows host
5455
shell: wsl-bash {0}
55-
working-directory: ${{steps.init_wsl.outputs.repo_path}}
5656
run: |
57+
cd ${{steps.init_wsl.outputs.repo_path}}
58+
5759
runfiles_dir="/mnt/c/test/dist/bin/tests/legacy-cli/${{inputs.test_target_name}}_/${{inputs.test_target_name}}.bat.runfiles"
5860
5961
# Make WSL symlinks compatible on Windows native file system.

.github/workflows/pr.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,11 @@ jobs:
135135
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@0000d926624b2fd918e93f1c6b5e2defba9af91f
136136
- run: ls -alh D:/a/angular-cli/angular-cli
137137
shell: bash
138-
#- name: Run CLI E2E tests
139-
# uses: ./.github/shared-actions/windows-bazel-test
140-
# with:
141-
# test_target_name: e2e_node22
142-
# test_args: --esbuild --glob "tests/basic/{build,rebuild}.ts"
138+
- name: Run CLI E2E tests
139+
uses: ./.github/shared-actions/windows-bazel-test
140+
with:
141+
test_target_name: e2e_node22
142+
test_args: --esbuild --glob "tests/basic/{build,rebuild}.ts"
143143
- run: ls -alh D:/a/angular-cli/angular-cli
144144
shell: bash
145145

packages/angular/build/BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,6 @@ api_golden_test_npm_package(
309309
":npm_package",
310310
"//goldens:public-api",
311311
],
312-
golden_dir = "angular_cli/goldens/public-api/angular/build",
313-
npm_package = "angular_cli/packages/angular/build/npm_package",
312+
golden_dir = "goldens/public-api/angular/build",
313+
npm_package = "packages/angular/build/npm_package",
314314
)

packages/angular/ssr/BUILD.bazel

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
load("@aspect_rules_js//npm:defs.bzl", "npm_package")
2-
load("@npm//@angular/build-tooling/bazel/api-golden:index.bzl", "api_golden_test_npm_package")
2+
load("@devinfra//bazel/api-golden:index_rjs.bzl", "api_golden_test_npm_package")
33
load("@npm2//:defs.bzl", "npm_link_all_packages")
44
load("@rules_pkg//:pkg.bzl", "pkg_tar")
55
load("//tools:defaults2.bzl", "ng_package", "ts_project")
@@ -90,6 +90,6 @@ api_golden_test_npm_package(
9090
":npm_package",
9191
"//goldens:public-api",
9292
],
93-
golden_dir = "angular_cli/goldens/public-api/angular/ssr",
94-
npm_package = "angular_cli/packages/angular/ssr/npm_package",
93+
golden_dir = "goldens/public-api/angular/ssr",
94+
npm_package = "packages/angular/ssr/npm_package",
9595
)

packages/angular_devkit/architect/BUILD.bazel

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Use of this source code is governed by an MIT-style license that can be
44
# found in the LICENSE file at https://angular.dev/license
55

6-
load("@npm//@angular/build-tooling/bazel/api-golden:index.bzl", "api_golden_test_npm_package")
6+
load("@devinfra//bazel/api-golden:index_rjs.bzl", "api_golden_test_npm_package")
77
load("@npm2//:defs.bzl", "npm_link_all_packages")
88
load("//tools:defaults2.bzl", "jasmine_test", "npm_package", "ts_project")
99
load("//tools:ts_json_schema.bzl", "ts_json_schema")
@@ -122,7 +122,7 @@ api_golden_test_npm_package(
122122
":npm_package",
123123
"//goldens:public-api",
124124
],
125-
golden_dir = "angular_cli/goldens/public-api/angular_devkit/architect",
126-
npm_package = "angular_cli/packages/angular_devkit/architect/npm_package",
125+
golden_dir = "goldens/public-api/angular_devkit/architect",
126+
npm_package = "packages/angular_devkit/architect/npm_package",
127127
)
128128
# @external_end

packages/angular_devkit/build_angular/BUILD.bazel

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Use of this source code is governed by an MIT-style license that can be
44
# found in the LICENSE file at https://angular.dev/license
55

6-
load("@npm//@angular/build-tooling/bazel/api-golden:index.bzl", "api_golden_test_npm_package")
6+
load("@devinfra//bazel/api-golden:index_rjs.bzl", "api_golden_test_npm_package")
77
load("@npm2//:defs.bzl", "npm_link_all_packages")
88
load("//tools:defaults2.bzl", "copy_to_bin", "jasmine_test", "npm_package", "ts_project")
99
load("//tools:ts_json_schema.bzl", "ts_json_schema")
@@ -275,8 +275,8 @@ api_golden_test_npm_package(
275275
":npm_package",
276276
"//goldens:public-api",
277277
],
278-
golden_dir = "angular_cli/goldens/public-api/angular_devkit/build_angular",
279-
npm_package = "angular_cli/packages/angular_devkit/build_angular/npm_package",
278+
golden_dir = "goldens/public-api/angular_devkit/build_angular",
279+
npm_package = "packages/angular_devkit/build_angular/npm_package",
280280
)
281281

282282
# Large build_angular specs

packages/angular_devkit/build_webpack/BUILD.bazel

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Use of this source code is governed by an MIT-style license that can be
44
# found in the LICENSE file at https://angular.dev/license
55

6-
load("@npm//@angular/build-tooling/bazel/api-golden:index.bzl", "api_golden_test_npm_package")
6+
load("@devinfra//bazel/api-golden:index_rjs.bzl", "api_golden_test_npm_package")
77
load("@npm2//:defs.bzl", "npm_link_all_packages")
88
load("//tools:defaults2.bzl", "jasmine_test", "npm_package", "ts_project")
99
load("//tools:ts_json_schema.bzl", "ts_json_schema")
@@ -120,6 +120,6 @@ api_golden_test_npm_package(
120120
":npm_package",
121121
"//goldens:public-api",
122122
],
123-
golden_dir = "angular_cli/goldens/public-api/angular_devkit/build_webpack",
124-
npm_package = "angular_cli/packages/angular_devkit/build_webpack/npm_package",
123+
golden_dir = "goldens/public-api/angular_devkit/build_webpack",
124+
npm_package = "packages/angular_devkit/build_webpack/npm_package",
125125
)

packages/angular_devkit/core/BUILD.bazel

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("@npm//@angular/build-tooling/bazel/api-golden:index.bzl", "api_golden_test_npm_package")
1+
load("@devinfra//bazel/api-golden:index_rjs.bzl", "api_golden_test_npm_package")
22
load("//tools:defaults2.bzl", "jasmine_test", "npm_package", "ts_project")
33

44
# Copyright Google Inc. All Rights Reserved.
@@ -90,8 +90,10 @@ api_golden_test_npm_package(
9090
":npm_package",
9191
"//goldens:public-api",
9292
],
93-
golden_dir = "angular_cli/goldens/public-api/angular_devkit/core",
94-
npm_package = "angular_cli/packages/angular_devkit/core/npm_package",
95-
types = ["@npm//@types/node"],
93+
golden_dir = "goldens/public-api/angular_devkit/core",
94+
npm_package = "packages/angular_devkit/core/npm_package",
95+
types = {
96+
"node": "//:node_modules/@types/node",
97+
},
9698
)
9799
# @external_end

packages/angular_devkit/schematics/BUILD.bazel

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("@npm//@angular/build-tooling/bazel/api-golden:index.bzl", "api_golden_test_npm_package")
1+
load("@devinfra//bazel/api-golden:index_rjs.bzl", "api_golden_test_npm_package")
22
load("@npm2//:defs.bzl", "npm_link_all_packages")
33
load("//tools:defaults2.bzl", "jasmine_test", "npm_package", "ts_project")
44

@@ -85,7 +85,9 @@ api_golden_test_npm_package(
8585
":npm_package",
8686
"//goldens:public-api",
8787
],
88-
golden_dir = "angular_cli/goldens/public-api/angular_devkit/schematics",
89-
npm_package = "angular_cli/packages/angular_devkit/schematics/npm_package",
90-
types = ["@npm//@types/node"],
88+
golden_dir = "goldens/public-api/angular_devkit/schematics",
89+
npm_package = "packages/angular_devkit/schematics/npm_package",
90+
types = {
91+
"//:node_modules/@types/node": "node",
92+
},
9193
)

packages/ngtools/webpack/BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,6 @@ api_golden_test_npm_package(
8888
":npm_package",
8989
"//goldens:public-api",
9090
],
91-
golden_dir = "angular_cli/goldens/public-api/ngtools/webpack",
92-
npm_package = "angular_cli/packages/ngtools/webpack/npm_package",
91+
golden_dir = "goldens/public-api/ngtools/webpack",
92+
npm_package = "packages/ngtools/webpack/npm_package",
9393
)

0 commit comments

Comments
 (0)