2020-03-02 14:10:11 -05:00
|
|
|
workspace(name = "bazel_integration_test")
|
2017-12-06 09:56:49 -05:00
|
|
|
|
2018-12-01 19:08:15 -05:00
|
|
|
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
|
|
|
|
2019-02-04 18:53:32 -05:00
|
|
|
# Fetch rules_nodejs so we can install our npm dependencies
|
|
|
|
http_archive(
|
|
|
|
name = "build_bazel_rules_nodejs",
|
2021-01-11 15:24:51 -05:00
|
|
|
sha256 = "4952ef879704ab4ad6729a29007e7094aef213ea79e9f2e94cbe1c9a753e63ef",
|
|
|
|
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/2.2.0/rules_nodejs-2.2.0.tar.gz"],
|
2019-02-04 18:53:32 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
# Fetch sass rules for compiling sass files
|
|
|
|
http_archive(
|
|
|
|
name = "io_bazel_rules_sass",
|
2019-11-27 17:12:10 -05:00
|
|
|
sha256 = "77e241148f26d5dbb98f96fe0029d8f221c6cb75edbb83e781e08ac7f5322c5f",
|
|
|
|
strip_prefix = "rules_sass-1.24.0",
|
|
|
|
urls = [
|
|
|
|
"https://github.com/bazelbuild/rules_sass/archive/1.24.0.zip",
|
|
|
|
"https://mirror.bazel.build/github.com/bazelbuild/rules_sass/archive/1.24.0.zip",
|
|
|
|
],
|
2019-02-04 18:53:32 -05:00
|
|
|
)
|
2018-06-25 14:22:23 -04:00
|
|
|
|
2019-02-04 18:53:32 -05:00
|
|
|
# Check the bazel version and download npm dependencies
|
2020-03-02 20:56:54 -05:00
|
|
|
load("@build_bazel_rules_nodejs//:index.bzl", "node_repositories", "yarn_install")
|
2019-02-04 18:53:32 -05:00
|
|
|
|
|
|
|
# Setup the Node.js toolchain
|
2018-09-05 15:38:53 -04:00
|
|
|
node_repositories(
|
2019-06-19 00:26:53 -04:00
|
|
|
# Use same node version as root angular WORKSPACE since
|
|
|
|
# we share node_module packages and some require node >= 10.15.0
|
2020-01-24 12:59:15 -05:00
|
|
|
node_version = "12.14.1",
|
2019-03-20 15:55:31 -04:00
|
|
|
yarn_version = "1.12.1",
|
2018-09-05 15:38:53 -04:00
|
|
|
)
|
2018-05-29 18:35:48 -04:00
|
|
|
|
2019-02-04 18:53:32 -05:00
|
|
|
# Install our npm dependencies into @npm
|
2018-10-04 16:14:14 -04:00
|
|
|
yarn_install(
|
|
|
|
name = "npm",
|
2019-05-22 20:28:42 -04:00
|
|
|
package_json = "//:package.json",
|
2020-03-02 14:10:11 -05:00
|
|
|
# Turn off symlink_node_modules here as it causes flakiness with missing
|
|
|
|
# files in node_modules.
|
|
|
|
# TODO: track down the root cause of the flakiness; current suspect is that
|
|
|
|
# it is an issue with managed_directories when resources are limited
|
|
|
|
symlink_node_modules = False,
|
2019-05-22 20:28:42 -04:00
|
|
|
yarn_lock = "//:yarn.lock",
|
2018-10-04 16:14:14 -04:00
|
|
|
)
|
|
|
|
|
2019-07-24 11:52:26 -04:00
|
|
|
# Load protractor dependencies
|
2020-06-25 04:32:41 -04:00
|
|
|
load("@npm//@bazel/protractor:package.bzl", "npm_bazel_protractor_dependencies")
|
2019-07-24 11:52:26 -04:00
|
|
|
|
|
|
|
npm_bazel_protractor_dependencies()
|
|
|
|
|
2019-02-04 18:53:32 -05:00
|
|
|
# Load karma dependencies
|
2020-06-25 04:32:41 -04:00
|
|
|
load("@npm//@bazel/karma:package.bzl", "npm_bazel_karma_dependencies")
|
2019-02-04 18:53:32 -05:00
|
|
|
|
2019-09-27 18:49:59 -04:00
|
|
|
npm_bazel_karma_dependencies()
|
2019-02-04 18:53:32 -05:00
|
|
|
|
|
|
|
# Setup the rules_webtesting toolchain
|
2019-02-13 12:33:48 -05:00
|
|
|
load("@io_bazel_rules_webtesting//web:repositories.bzl", "web_test_repositories")
|
2018-05-29 18:35:48 -04:00
|
|
|
|
|
|
|
web_test_repositories()
|
2018-12-06 17:46:51 -05:00
|
|
|
|
2019-08-15 11:35:33 -04:00
|
|
|
load("@io_bazel_rules_webtesting//web/versioned:browsers-0.3.2.bzl", "browser_repositories")
|
2019-02-13 12:33:48 -05:00
|
|
|
|
2019-08-15 11:35:33 -04:00
|
|
|
browser_repositories(
|
|
|
|
chromium = True,
|
|
|
|
firefox = True,
|
|
|
|
)
|
2018-05-29 18:35:48 -04:00
|
|
|
|
2019-02-04 18:53:32 -05:00
|
|
|
# Setup the rules_sass toolchain
|
2018-06-04 13:45:27 -04:00
|
|
|
load("@io_bazel_rules_sass//sass:sass_repositories.bzl", "sass_repositories")
|
2018-05-29 18:35:48 -04:00
|
|
|
|
|
|
|
sass_repositories()
|