]> git.puffer.fish Git - matthieu/nova.git/commitdiff
fix tests
authorMatthieu <matthieu@developershouse.xyz>
Wed, 8 Sep 2021 15:41:35 +0000 (19:41 +0400)
committerMatthieu <matthieu@developershouse.xyz>
Wed, 8 Sep 2021 15:41:35 +0000 (19:41 +0400)
.github/workflows/bazel-build.yml
BUILD
gateway/BUILD
novactl/BUILD.bazel
ratelimiter/BUILD
webhook/BUILD

index 7f52cdb0a0748fd2d2994e660439df7c8b9cf53d..1fcffd85630ffcc8eef63e3e4ff6036a84f894df 100644 (file)
@@ -47,7 +47,7 @@ jobs:
       - name: Execute Bazel tests\r
         shell: bash\r
         run: |\r
-          bazel test //:test\r
+          bazel test //:tests\r
       # Runs a set of commands using the runners shell\r
       - name: Execute build script\r
         shell: bash\r
diff --git a/BUILD b/BUILD
index 791364d69adb524f1c8661a0a649f1a67258fe6d..cf4ac62c3cd1e6aad30e08c747f333cfcbb0f172 100644 (file)
--- a/BUILD
+++ b/BUILD
@@ -27,6 +27,16 @@ container_bundle(
   }
 )
 
+test_suite(
+    name = "tests",
+    tests = [
+        "//novactl:tests",
+        "//webhook:tests",
+        "//gateway:tests",
+        "//ratelimiter:tests"
+    ],
+)
+
 container_push(
   name = "publish",
   bundle = ":bundle",
index 738c669cdbf02df89e121b82fb7ba0156b24aee1..2413b4d261333c0dda5755d29e24f09654a09b77 100644 (file)
@@ -5,7 +5,7 @@ load("@io_bazel_rules_docker//rust:image.bzl", "rust_image")
 load("@io_bazel_rules_docker//docker/package_managers:download_pkgs.bzl", "download_pkgs")
 load("@io_bazel_rules_docker//docker/package_managers:install_pkgs.bzl", "install_pkgs")
 
-exports_files(["Cargo.toml"])
+test_suite(name = "tests")
 
 rust_binary(
     name = "gateway",
@@ -20,4 +20,4 @@ rust_image(
     binary = ":gateway",
     visibility = ["//visibility:public"],
     base = "@ubuntu1604//image",
-)
\ No newline at end of file
+)
index 44d9a19f85275c2d7f2e1a8687f7a00cc1b09013..5c5a33c867211f9195f7196e3c69d14ce01e7688 100644 (file)
@@ -1,6 +1,8 @@
 load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
 load("@io_bazel_rules_docker//go:image.bzl", "go_image")
 
+test_suite(name = "tests")
+
 go_library(
     name = "novactl_lib",
     srcs = ["main.go"],
@@ -22,4 +24,4 @@ go_image(
     name = "image",
     embed = [":novactl_lib"],
     visibility = ["//visibility:public"],
-)
\ No newline at end of file
+)
index 3a8b2e402662adc80d0640839deac6e193596fc3..f9143e11fbc4c2dce2960e725445d8c5eeee82bf 100644 (file)
@@ -3,14 +3,13 @@ load("@rules_rust//cargo:cargo_build_script.bzl", "cargo_build_script")
 load("//cargo:crates.bzl", "all_crate_deps", "crate_deps")
 load("@io_bazel_rules_docker//rust:image.bzl", "rust_image")
 
-exports_files(["Cargo.toml"])
+test_suite(name = "tests")
 
 cargo_build_script(
     name = "build_script",
     srcs = ["build.rs"],
     build_script_env = {
         "PROTOC": "$(location @com_google_protobuf//:protoc)",
-        "PROTO": "$(location //ratelimiter/proto:nova.ratelimit.v1.proto)"
     },
     data = [
         "//ratelimiter/proto:nova.ratelimit.v1.proto",
index 84c04f6ed0c4565f4e252dac0f499deaf92e8122..4e99e2c063fc907295360eb4b84d5d22e1532c89 100644 (file)
@@ -2,7 +2,7 @@ load("@rules_rust//rust:rust.bzl", "rust_binary", "rust_test")
 load("//cargo:crates.bzl", "all_crate_deps")
 load("@io_bazel_rules_docker//rust:image.bzl", "rust_image")
 
-exports_files(["Cargo.toml"])
+test_suite(name = "tests")
 
 rust_binary(
     name = "webhook",
@@ -22,4 +22,4 @@ rust_image(
     srcs = glob(["src/**"]),
     deps = all_crate_deps(),
     visibility = ["//visibility:public"],
-)
\ No newline at end of file
+)