workspace(name = "bazel_integration_test") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") # Fetch rules_nodejs so we can install our npm dependencies http_archive( name = "build_bazel_rules_nodejs", sha256 = "9d93d4e1340c43dbf6b2fd66b683d89630a6310bf8be3bf40ec96685dcacc26c", urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/2.3.3/rules_nodejs-2.3.3.tar.gz"], ) # Fetch sass rules for compiling sass files http_archive( name = "io_bazel_rules_sass", 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", ], ) # Check the bazel version and download npm dependencies load("@build_bazel_rules_nodejs//:index.bzl", "node_repositories", "yarn_install") # Setup the Node.js toolchain node_repositories( # Use same node version as root angular WORKSPACE since # we share node_module packages and some require node >= 10.15.0 node_version = "12.14.1", yarn_version = "1.12.1", ) # Install our npm dependencies into @npm yarn_install( name = "npm", package_json = "//:package.json", # 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, yarn_lock = "//:yarn.lock", ) # Load protractor dependencies load("@npm//@bazel/protractor:package.bzl", "npm_bazel_protractor_dependencies") npm_bazel_protractor_dependencies() # Load karma dependencies load("@npm//@bazel/karma:package.bzl", "npm_bazel_karma_dependencies") npm_bazel_karma_dependencies() # Setup the rules_webtesting toolchain load("@io_bazel_rules_webtesting//web:repositories.bzl", "web_test_repositories") web_test_repositories() load("@io_bazel_rules_webtesting//web/versioned:browsers-0.3.2.bzl", "browser_repositories") browser_repositories( chromium = True, firefox = True, ) # Setup the rules_sass toolchain load("@io_bazel_rules_sass//sass:sass_repositories.bzl", "sass_repositories") sass_repositories()