ci(compiler): run compiler tests in bazel (#22900)

PR Close #22900
This commit is contained in:
Chuck Jazdzewski
2018-03-20 17:02:50 -07:00
committed by Matias Niemelä
parent e44f69c387
commit 8ca26a9ebb
3 changed files with 113 additions and 30 deletions

View File

@ -1,18 +1,24 @@
load("//tools:defaults.bzl", "ts_library", "ts_web_test")
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
# Test that should only be run in node
NODE_ONLY = [
"**/*_node_only_spec.ts",
"aot/**/*.ts",
"render3/**/*.ts",
]
ts_library(
name = "test_lib",
testonly = 1,
srcs = glob(
["**/*.ts"],
exclude = ["**/*_node_only_spec.ts"],
exclude = NODE_ONLY,
),
deps = [
"//packages:types",
"//packages/common",
"//packages/compiler",
"//packages/compiler-cli",
"//packages/compiler/testing",
"//packages/core",
"//packages/core/testing",
@ -25,19 +31,25 @@ ts_library(
ts_library(
name = "test_node_only_lib",
testonly = 1,
srcs = glob(["**/*_node_only_spec.ts"]),
srcs = glob(NODE_ONLY),
deps = [
":test_lib",
"//packages/compiler",
"//packages/compiler-cli",
"//packages/compiler/testing",
"//packages/core",
],
)
jasmine_node_test(
name = "test",
bootstrap = ["angular/tools/testing/init_node_spec.js"],
data = [
"//packages/animations:npm_package",
"//packages/common:npm_package",
"//packages/core:npm_package",
],
# dissable since tests are running but not yet passing
tags = ["manual"],
deps = [
":test_lib",
":test_node_only_lib",
@ -49,7 +61,6 @@ jasmine_node_test(
ts_web_test(
name = "test_web",
# disable since tests are running but not yet passing
tags = ["manual"],
deps = [
":test_lib",
],