| # Copyright 2017 The Bazel Authors. All rights reserved. |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| load(":test.bzl", "example_integration_test") |
| |
| example_integration_test( |
| name = "examples_angular", |
| timeout = "long", |
| npm_packages = { |
| "//packages/rollup:npm_package": "@bazel/rollup", |
| "//packages/terser:npm_package": "@bazel/terser", |
| "//packages/typescript:npm_package": "@bazel/typescript", |
| }, |
| owners = [ |
| "@alan-agius4", |
| "@jbedard", |
| ], |
| |
| # bazel-in-bazel examples_angular fails on Windows on bazelci cloning a git repo: |
| # ``` |
| # ERROR: no such package '@io_bazel_rules_k8s//k8s': Traceback (most recent call last): |
| # File "D:/b/ftxm343s/execroot/build_bazel_rules_nodejs/_tmp/3726d3573001cb4068a18af89eb255de/_bazel_b/ktluxf26/external/bazel_tools/tools/build_defs/repo/git.bzl", line 163 |
| # _clone_or_update(ctx) |
| # File "D:/b/ftxm343s/execroot/build_bazel_rules_nodejs/_tmp/3726d3573001cb4068a18af89eb255de/_bazel_b/ktluxf26/external/bazel_tools/tools/build_defs/repo/git.bzl", line 36, in _clone_or_update |
| # git_repo(ctx, directory) |
| # ``` |
| # This is most likely due to a memory issue with this large bazel-in-bazel test. |
| # TODO(gregmagolan): figure out what is broken with the above |
| tags = ["no-bazelci-windows"], |
| ) |
| |
| example_integration_test( |
| name = "examples_create-react-app", |
| npm_packages = { |
| "//packages/runfiles:npm_package": "@bazel/runfiles", |
| }, |
| # TODO: figure out why this fails on Windows since setting |
| # symlink_node_modules to False in the test WORKSPACE |
| tags = ["no-bazelci-windows"], |
| ) |
| |
| example_integration_test( |
| name = "examples_react_webpack", |
| # TODO: add some tests in the example |
| bazel_commands = ["build ..."], |
| npm_packages = { |
| "//packages/typescript:npm_package": "@bazel/typescript", |
| }, |
| # TODO(alexeagle): somehow this is broken by the new node-patches based node_patches script |
| # ERROR: D:/temp/tmp-6900sejcsrcttpdb/BUILD.bazel:37:1: output 'app.bundle.js' was not created |
| tags = ["no-bazelci-windows"], |
| ) |
| |
| example_integration_test( |
| name = "examples_app", |
| npm_packages = { |
| "//packages/rollup:npm_package": "@bazel/rollup", |
| "//packages/terser:npm_package": "@bazel/terser", |
| "//packages/typescript:npm_package": "@bazel/typescript", |
| }, |
| ) |
| |
| example_integration_test( |
| name = "examples_toolchain", |
| repositories = {"//:release-core": "rules_nodejs"}, |
| ) |
| |
| example_integration_test( |
| name = "examples_closure", |
| npm_packages = { |
| "//packages/runfiles:npm_package": "@bazel/runfiles", |
| }, |
| # TODO: figure out why this fails on Windows since setting |
| # symlink_node_modules to False in the test WORKSPACE |
| tags = ["no-bazelci-windows"], |
| ) |
| |
| example_integration_test( |
| name = "examples_parcel", |
| # Parcel spawns a subprocess which requires our node-patches |
| # but we don't yet have a mechanism on Windows for spawned processes |
| # to inherit the --require script needed to install the patches |
| tags = ["no-bazelci-windows"], |
| ) |
| |
| example_integration_test( |
| name = "examples_cypress", |
| bazel_commands = ["test //..."], |
| npm_packages = { |
| "//packages/cypress:npm_package": "@bazel/cypress", |
| "//packages/typescript:npm_package": "@bazel/typescript", |
| }, |
| owners = ["@mrmeku"], |
| tags = [ |
| "cypress", |
| ], |
| ) |
| |
| example_integration_test( |
| name = "examples_jest", |
| npm_packages = { |
| "//packages/typescript:npm_package": "@bazel/typescript", |
| }, |
| owners = ["@mrmeku"], |
| tags = [ |
| # ERROR: C:/users/b/_bazel_b/sbb5tpjc/external/npm/BUILD.bazel:5053:10: Copying directory external/npm/_/node_modules/jest-snapshot failed: (Exit 4): cmd.exe failed: error executing command cmd.exe /C bazel-out\x64_windows-fastbuild\bin\external\npm\node_modules\jest-snapshot--603629912-cmd.bat |
| # Insufficient memory |
| "no-bazelci-windows", |
| ], |
| ) |
| |
| example_integration_test( |
| name = "examples_kotlin", |
| npm_packages = { |
| "//packages/jasmine:npm_package": "@bazel/jasmine", |
| "//packages/rollup:npm_package": "@bazel/rollup", |
| "//packages/terser:npm_package": "@bazel/terser", |
| }, |
| tags = [ |
| # Bintray was removed from the internet, and the version of |
| # kotlinx-html-js we depend on isn't mirrored anywhere else. |
| # See https://github.com/bazelbuild/rules_nodejs/issues/2747 |
| "manual", |
| "no-circleci", |
| # Kotlin's kt_js_import relies on a helper written in Python |
| # https://github.com/bazelbuild/rules_kotlin/blob/master/kotlin/internal/js/importer.py |
| # but python isn't installed on BazelCI windows machines. |
| # Failure looks like |
| # [0 / 57] [Prepa] Expanding template external/io_bazel_rules_kotlin/kotlin/internal/js/importer.temp [for host] |
| # ERROR: D:/temp/tmp-67520fayqgbwmbgd/BUILD.bazel:10:1: Action kotlinx-html-js.js failed (Exit 2) |
| # LAUNCHER ERROR: Cannot launch process: "python.exe" |
| "no-bazelci-windows", |
| ], |
| ) |
| |
| example_integration_test( |
| name = "examples_web_testing", |
| npm_packages = { |
| "//packages/typescript:npm_package": "@bazel/typescript", |
| }, |
| ) |
| |
| example_integration_test( |
| name = "examples_webapp", |
| bazel_commands = [ |
| "info", |
| # enable runfiles explicitly so it is on for Windows since directory |
| # artifacts requires runfiles |
| "test ... --enable_runfiles", |
| ], |
| npm_packages = { |
| "//packages/rollup:npm_package": "@bazel/rollup", |
| "//packages/terser:npm_package": "@bazel/terser", |
| "//packages/typescript:npm_package": "@bazel/typescript", |
| }, |
| ) |
| |
| example_integration_test( |
| name = "examples_nestjs", |
| bazel_commands = [ |
| "test ...", |
| # Test cross-platform build |
| "build --platforms=@rules_nodejs//nodejs:linux_amd64 //src:docker", |
| ], |
| npm_packages = { |
| "//packages/jasmine:npm_package": "@bazel/jasmine", |
| "//packages/typescript:npm_package": "@bazel/typescript", |
| }, |
| owners = [ |
| "@zachgrayio", |
| "@zMotivat0r", |
| "@rayman1104", |
| "@siberex", |
| ], |
| # Fails on transitive dep of rules_docker |
| # error running 'git init C:/users/b/_bazel_b/3oe2yqkh/external/rules_cc' while working with @rules_cc: |
| # java.io.IOException: ERROR: src/main/native/windows/process.cc(199): CreateProcessW("git" init C:/users/b/_bazel_b/3oe2yqkh/external/rules_cc): The system cannot find the file specified |
| # |
| # NB: even after working around that by fetching rules_cc with an http_archive we get a follow-on failure |
| # ERROR: Analysis of target '//src:docker' failed; build aborted: no such package '@nodejs_image_base//image': Pull command failed: java.io.IOException: ERROR: src/main/native/windows/process.cc(199): CreateProcessW("C:\users\b\_bazel_b\vanuqgg3\external\go_puller_linux\file\downloaded" -directory C:/users/b/_bazel_b/vanuqgg3/external/nodejs_image_base/image -os linux -os-version "" -os-features "" -architecture amd64 -variant "" -features "" -name gcr.io/google-appengine/debian9@sha256:c05b781371f75d1bd7a199bc83de177173cc80c98dbfb6c1ef7075757addece4): %1 is not a valid Win32 application. |
| # (error: 193) (C:/users/b/_bazel_b/vanuqgg3/external/go_puller_linux/file/downloaded -directory |
| # C:/users/b/_bazel_b/vanuqgg3/external/nodejs_image_base/image -os linux -os-version -os-features -architecture amd64 -variant -features -name gcr.io/google-appengine/debian9@sha256:c05b781371f75d1bd7a199bc83de177173cc80c98dbfb6c1ef7075757addece4) |
| tags = ["no-bazelci-windows"], |
| ) |
| |
| example_integration_test( |
| name = "examples_protobufjs", |
| npm_packages = { |
| "//packages/jasmine:npm_package": "@bazel/jasmine", |
| "//packages/typescript:npm_package": "@bazel/typescript", |
| }, |
| # Flakes on windows |
| # TODO: understand flake fail mode and re-enable |
| tags = ["no-bazelci-windows"], |
| ) |
| |
| example_integration_test( |
| name = "examples_vendored_node_and_yarn", |
| npm_packages = { |
| "//packages/jasmine:npm_package": "@bazel/jasmine", |
| }, |
| # TODO: make it find node.exe rather than rely on us writing a .cmd wrapper |
| tags = ["no-bazelci-windows"], |
| ) |
| |
| example_integration_test( |
| name = "examples_vue", |
| npm_packages = {}, |
| # TODO: figure out why this fails on Windows since setting |
| # symlink_node_modules to False in the test WORKSPACE |
| tags = ["no-bazelci-windows"], |
| ) |
| |
| example_integration_test( |
| name = "examples_worker", |
| # There are no tests in this example |
| bazel_commands = [ |
| # By default this will build with worker enabled |
| "build //:do_work", |
| # Build again without the worker |
| "build --define=cache_bust=true --strategy=DoWork=standalone //:do_work", |
| ], |
| npm_packages = {"//packages/worker:npm_package": "@bazel/worker"}, |
| ) |
| |
| example_integration_test( |
| name = "examples_angular_bazel_architect", |
| timeout = "long", |
| bazel_commands = [ |
| "test ...", |
| ], |
| owners = [ |
| "@alan-agius4", |
| "@jbedard", |
| ], |
| tags = [ |
| # TODO(alexeagle): re-enable when it stops timing out on 4.x branch |
| "manual", |
| ], |
| ) |