diff --git a/.circleci/config.yml b/.circleci/config.yml index 26cb5e675520..f8f7f672a9b0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,11 +7,28 @@ # To validate changes, use an online parser, eg. # http://yaml-online-parser.appspot.com/ +## IMPORTANT +# If you change the `docker_image` version, also change the `cache_key` suffix and the version of +# `com_github_bazelbuild_buildtools` in the `/WORKSPACE` file. +var_1: &docker_image angular/ngcontainer:0.3.0 +var_2: &cache_key v2-ng-mat-{{ .Branch }}-{{ checksum "package-lock.json" }}-0.3.0 + +# Define common ENV vars +var_3: &define_env_vars + run: echo "export PROJECT_ROOT=$(pwd)" >> $BASH_ENV + +# See remote cache documentation in /docs/BAZEL.md +var_4: &setup-bazel-remote-cache + run: + name: Start up bazel remote cache proxy + command: ~/bazel-remote-proxy -backend circleci:// + background: true + # Settings common to each job anchor_1: &job_defaults working_directory: ~/ng docker: - - image: angular/ngcontainer:0.1.0 + - image: *docker_image # After checkout, rebase on top of master. # Similar to travis behavior, but not quite the same. @@ -29,15 +46,16 @@ jobs: - checkout: <<: *post_checkout - restore_cache: - key: material2-{{ .Branch }}-{{ checksum "package-lock.json" }} + key: *cache_key - run: bazel run @nodejs//:npm install # For some reason, circleci needs the postinstall to be run explicitly. # This may be unnecessary once rules_nodejs uses nodejs 8 - run: bazel run @nodejs//:npm run postinstall - run: bazel build src/... + - run: bazel test src/... - save_cache: - key: material2-{{ .Branch }}-{{ checksum "package-lock.json" }} + key: *cache_key paths: - "node_modules" diff --git a/BUILD.bazel b/BUILD.bazel index 62059b6163bd..fc6877454c67 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -76,10 +76,7 @@ filegroup( srcs = [ "//:node_modules/reflect-metadata/Reflect.js", "//:node_modules/zone.js/dist/zone.js", - "//:node_modules/zone.js/dist/async-test.js", - "//:node_modules/zone.js/dist/sync-test.js", - "//:node_modules/zone.js/dist/fake-async-test.js", - "//:node_modules/zone.js/dist/proxy.js", - "//:node_modules/zone.js/dist/jasmine-patch.js", + "//:node_modules/zone.js/dist/zone-testing.js", + "//:node_modules/zone.js/dist/task-tracking.js", ], ) diff --git a/WORKSPACE b/WORKSPACE index 071bd29ef7ad..d03bdc1ff639 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -3,16 +3,16 @@ workspace(name = "angular_material") # Add nodejs rules http_archive( name = "build_bazel_rules_nodejs", - url = "https://github.com/bazelbuild/rules_nodejs/archive/1931156c232a08356dfda02e9c8b0275c2e63c00.zip", - strip_prefix = "rules_nodejs-1931156c232a08356dfda02e9c8b0275c2e63c00", - sha256 = "9cfe33276a6ac0076ee9ee159c4a2576f9851c0f437435b5ac19b2e592493078", + url = "https://github.com/bazelbuild/rules_nodejs/archive/0.8.0.zip", + strip_prefix = "rules_nodejs-0.8.0", + sha256 = "4e40dd49ae7668d245c3107645f2a138660fcfd975b9310b91eda13f0c973953", ) # NOTE: this rule installs nodejs, npm, and yarn, but does NOT install # your npm dependencies. You must still run the package manager. load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories") -check_bazel_version("0.9.0") +check_bazel_version("0.13.0") node_repositories(package_json = ["//:package.json"]) # Add sass rules @@ -28,9 +28,9 @@ sass_repositories() # Add TypeScript rules http_archive( name = "build_bazel_rules_typescript", - url = "https://github.com/bazelbuild/rules_typescript/archive/0.12.1.zip", - strip_prefix = "rules_typescript-0.12.1", - sha256 = "24e2c36f60508c6d270ae4265b89b381e3f66d550e70c367ed3755ad8d7ce3b0", + url = "https://github.com/bazelbuild/rules_typescript/archive/0.12.3.zip", + strip_prefix = "rules_typescript-0.12.3", + sha256 = "967068c3540f59407716fbeb49949c1600dbf387faeeab3089085784dd21f60c", ) # Setup TypeScript Bazel workspace @@ -48,3 +48,9 @@ local_repository( name = "rxjs", path = "node_modules/rxjs/src", ) + + +# This commit matches the version of buildifier in angular/ngcontainer +# If you change this, also check if it matches the version in the angular/ngcontainer +# version in /.circleci/config.yml +BAZEL_BUILDTOOLS_VERSION = "fd9878fd5de921e0bbab3dcdcb932c2627812ee1" diff --git a/package.json b/package.json index 286e2db9cc32..357e3da2d389 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "systemjs": "0.19.43", "tsickle": "^0.27.2", "tslib": "^1.9.0", - "zone.js": "^0.8.4" + "zone.js": "^0.8.26" }, "devDependencies": { "@angular-devkit/core": "^0.5.12", diff --git a/src/cdk/a11y/BUILD.bazel b/src/cdk/a11y/BUILD.bazel index ca76b85de653..a91cfff27e38 100644 --- a/src/cdk/a11y/BUILD.bazel +++ b/src/cdk/a11y/BUILD.bazel @@ -48,7 +48,6 @@ ts_web_test( bootstrap = [ "//:web_test_bootstrap_scripts", ], - tags = ["manual"], # Do not sort deps = [ "//:tslib_bundle", diff --git a/src/cdk/accordion/BUILD.bazel b/src/cdk/accordion/BUILD.bazel index 208d5532cc6c..a2878104d480 100644 --- a/src/cdk/accordion/BUILD.bazel +++ b/src/cdk/accordion/BUILD.bazel @@ -29,8 +29,6 @@ ts_library( ts_web_test( name = "unit_tests", bootstrap = ["//:web_test_bootstrap_scripts"], - tags = ["manual"], - # Do not sort deps = [ "//:tslib_bundle", diff --git a/src/cdk/bidi/BUILD.bazel b/src/cdk/bidi/BUILD.bazel index 4b1bfa0cfd02..70f5572456fc 100644 --- a/src/cdk/bidi/BUILD.bazel +++ b/src/cdk/bidi/BUILD.bazel @@ -27,8 +27,6 @@ ts_web_test( bootstrap = [ "//:web_test_bootstrap_scripts", ], - tags = ["manual"], - # Do not sort deps = [ "//:tslib_bundle", diff --git a/src/cdk/coercion/BUILD.bazel b/src/cdk/coercion/BUILD.bazel index e0f884e32eb9..a78f31f94efd 100644 --- a/src/cdk/coercion/BUILD.bazel +++ b/src/cdk/coercion/BUILD.bazel @@ -22,6 +22,5 @@ ts_library( ts_web_test( name = "unit_tests", bootstrap = ["//:web_test_bootstrap_scripts"], - tags = ["manual"], deps = [":coercion_test_sources"], ) diff --git a/src/cdk/collections/BUILD.bazel b/src/cdk/collections/BUILD.bazel index b5ac120b0367..c6339ee5842b 100644 --- a/src/cdk/collections/BUILD.bazel +++ b/src/cdk/collections/BUILD.bazel @@ -25,8 +25,6 @@ ts_library( ts_web_test( name = "unit_tests", bootstrap = ["//:web_test_bootstrap_scripts"], - tags = ["manual"], - # Do not sort deps = [ "//:tslib_bundle", diff --git a/src/cdk/layout/BUILD.bazel b/src/cdk/layout/BUILD.bazel index 5947ac8b0b53..742dc9a049a1 100644 --- a/src/cdk/layout/BUILD.bazel +++ b/src/cdk/layout/BUILD.bazel @@ -30,8 +30,6 @@ ts_library( ts_web_test( name = "unit_tests", bootstrap = ["//:web_test_bootstrap_scripts"], - tags = ["manual"], - # Do not sort deps = [ "//:tslib_bundle", diff --git a/src/cdk/observers/BUILD.bazel b/src/cdk/observers/BUILD.bazel index 681db453d0c4..58345024422f 100644 --- a/src/cdk/observers/BUILD.bazel +++ b/src/cdk/observers/BUILD.bazel @@ -28,8 +28,6 @@ ts_library( ts_web_test( name = "unit_tests", bootstrap = ["//:web_test_bootstrap_scripts"], - tags = ["manual"], - # Do not sort deps = [ "//:tslib_bundle", diff --git a/src/cdk/portal/BUILD.bazel b/src/cdk/portal/BUILD.bazel index db3289aa9554..1bb6f2bd7ea1 100644 --- a/src/cdk/portal/BUILD.bazel +++ b/src/cdk/portal/BUILD.bazel @@ -25,7 +25,6 @@ ts_library( ts_web_test( name = "unit_tests", bootstrap = ["//:web_test_bootstrap_scripts"], - tags = ["manual"], # Do not sort deps = [ "//:tslib_bundle", diff --git a/src/cdk/scrolling/BUILD.bazel b/src/cdk/scrolling/BUILD.bazel index 3a249aeaccfd..aa83f52ab8df 100644 --- a/src/cdk/scrolling/BUILD.bazel +++ b/src/cdk/scrolling/BUILD.bazel @@ -31,8 +31,6 @@ ts_web_test( bootstrap = [ "//:web_test_bootstrap_scripts", ], - tags = ["manual"], - # Do not sort deps = [ "//:tslib_bundle", diff --git a/src/cdk/table/BUILD.bazel b/src/cdk/table/BUILD.bazel index 6c47fcead887..3654d070812f 100644 --- a/src/cdk/table/BUILD.bazel +++ b/src/cdk/table/BUILD.bazel @@ -31,7 +31,6 @@ ts_library( ts_web_test( name = "unit_tests", bootstrap = ["//:web_test_bootstrap_scripts"], - tags = ["manual"], # Do not sort deps = [ "//:tslib_bundle",