Skip to content

Commit

Permalink
refactor: introduce :all_tests targets so angular example can be tested
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeagle committed Sep 12, 2019
1 parent 51448fb commit 1e98b49
Show file tree
Hide file tree
Showing 13 changed files with 103 additions and 0 deletions.
18 changes: 18 additions & 0 deletions examples/angular/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,21 @@ k8s_deploy(
},
template = ":deployment.yaml",
)

# For testing from the root workspace of this repository with bazel_integration_test.
filegroup(
name = "all_files",
srcs = glob(
include = ["**/*"],
exclude = [
"bazel-out/**/*",
"dist/**/*",
"node_modules/**/*",
],
) + [
"//e2e:all_files",
"//src:all_files",
"//tools:all_files",
],
visibility = ["//visibility:public"],
)
7 changes: 7 additions & 0 deletions examples/angular/e2e/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,10 @@ protractor_web_test_suite(
server = "//src:devserver",
deps = [":e2e"],
)

# For testing from the root workspace of this repository with bazel_integration_test.
filegroup(
name = "all_files",
srcs = glob(["**/*"]),
visibility = ["//visibility:public"],
)
12 changes: 12 additions & 0 deletions examples/angular/src/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,15 @@ container_image(
tags = ["local"],
workdir = "/app/src/nodejs_image.binary.runfiles/angular_bazel_example",
)

# For testing from the root workspace of this repository with bazel_integration_test.
filegroup(
name = "all_files",
srcs = glob(["**/*"]) + [
"//src/app:all_files",
"//src/shared/material:all_files",
"//src/assets:all_files",
"//src/example:all_files",
"//src/lib/shorten:all_files",
],
)
10 changes: 10 additions & 0 deletions examples/angular/src/app/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,13 @@ ng_module(
"@npm//@ngrx/store",
],
)

# For testing from the root workspace of this repository with bazel_integration_test.
filegroup(
name = "all_files",
srcs = glob(["**/*"]) + [
"//src/app/hello-world:all_files",
"//src/app/todos:all_files",
"//src/app/home:all_files",
],
)
6 changes: 6 additions & 0 deletions examples/angular/src/app/hello-world/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,9 @@ ts_web_test_suite(
"//src:rxjs_umd_modules",
],
)

# For testing from the root workspace of this repository with bazel_integration_test.
filegroup(
name = "all_files",
srcs = glob(["**/*"]),
)
6 changes: 6 additions & 0 deletions examples/angular/src/app/home/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,9 @@ ng_module(
"@npm//@angular/router",
],
)

# For testing from the root workspace of this repository with bazel_integration_test.
filegroup(
name = "all_files",
srcs = glob(["**/*"]),
)
8 changes: 8 additions & 0 deletions examples/angular/src/app/todos/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,11 @@ ng_module(
"@npm//rxjs",
],
)

# For testing from the root workspace of this repository with bazel_integration_test.
filegroup(
name = "all_files",
srcs = glob(["**/*"]) + [
"//src/app/todos/reducers:all_files",
],
)
6 changes: 6 additions & 0 deletions examples/angular/src/app/todos/reducers/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,9 @@ ts_library(
"@npm//@ngrx/store",
],
)

# For testing from the root workspace of this repository with bazel_integration_test.
filegroup(
name = "all_files",
srcs = glob(["**/*"]),
)
6 changes: 6 additions & 0 deletions examples/angular/src/assets/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,9 @@ filegroup(
"*.css",
]),
)

# For testing from the root workspace of this repository with bazel_integration_test.
filegroup(
name = "all_files",
srcs = glob(["**/*"]),
)
6 changes: 6 additions & 0 deletions examples/angular/src/example/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@ filegroup(
"index.html",
],
)

# For testing from the root workspace of this repository with bazel_integration_test.
filegroup(
name = "all_files",
srcs = glob(["**/*"]),
)
6 changes: 6 additions & 0 deletions examples/angular/src/lib/shorten/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,9 @@ ts_library(
)

# TODO(alexeagle): show how it can be deployed to npm

# For testing from the root workspace of this repository with bazel_integration_test.
filegroup(
name = "all_files",
srcs = glob(["**/*"]),
)
6 changes: 6 additions & 0 deletions examples/angular/src/shared/material/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,9 @@ ng_module(
"@npm//@angular/material",
],
)

# For testing from the root workspace of this repository with bazel_integration_test.
filegroup(
name = "all_files",
srcs = glob(["**/*"]),
)
6 changes: 6 additions & 0 deletions examples/angular/tools/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# For testing from the root workspace of this repository with bazel_integration_test.
filegroup(
name = "all_files",
srcs = glob(["**/*"]),
visibility = ["//:__subpackages__"],
)

0 comments on commit 1e98b49

Please sign in to comment.