/
BUILD.bazel
34 lines (32 loc) · 1.28 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
load("@bazel_skylib//lib:dicts.bzl", "dicts")
load("//tools:integration.bzl", "CLI_PROJECT_MAPPINGS")
load("//tools:defaults.bzl", "node_integration_test")
npmPackageMappings = dicts.add(
CLI_PROJECT_MAPPINGS,
{
"//src/cdk:npm_package_archive": "@angular/cdk",
"//src/material:npm_package_archive": "@angular/material",
"//src/material-experimental:npm_package_archive": "@angular/material-experimental",
},
)
node_integration_test(
name = "test",
srcs = glob(["**/*"]),
commands = [
# Note: We use a cache folder within the integration test as otherwise
# the NPM package mapped archive would be cached in the system.
# See: https://github.com/yarnpkg/yarn/issues/2165.
# TODO(devversion): determine if a solution/workaround could live in the test runner.
"yarn install --cache-folder .yarn_cache_folder/",
"yarn ng generate @angular/material:mdc-migration -c all",
"yarn test",
],
npm_packages = npmPackageMappings,
tags = [
# Chromium cannot run in Sandbox. For this test, sandbox is disabled.
# Additionally, we need to disable RBE as this test relies on internet
# access for installing the NPM packages.
"no-sandbox",
"no-remote-exec",
],
)