github.com/actions-on-google/gactions@v3.2.0+incompatible/api/BUILD.bazel (about)

     1  load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
     2  load("@bazel_gazelle//:def.bzl", "gazelle")
     3  
     4  package(default_visibility = ["//visibility:public"])
     5  
     6  # gazelle:prefix github.com/actions-on-google/gactions/api/
     7  gazelle(name = "gazelle")
     8  
     9  test_suite(
    10      name = "all_tests",
    11      tags = ["-notwindows"],
    12  )
    13  
    14  go_library(
    15      name = "yamlutils",
    16      srcs = ["yamlutils.go"],
    17      importpath = "github.com/actions-on-google/gactions/api/yamlutils",
    18      deps = ["@in_gopkg_yaml//:go_default_library"],
    19  )
    20  
    21  go_test(
    22      name = "yamlutils_test",
    23      size = "small",
    24      srcs = ["yamlutils_test.go"],
    25      data = [
    26          "testdata/google_fulfillments_valid.yaml",
    27          "testdata/google_fulfillments_with_extra_fields.yaml",
    28          "testdata/google_fulfillments_with_missing_fields.yaml",
    29          "testdata/localized_settings_valid.yaml",
    30          "testdata/manifest_invalid.yaml",
    31          "testdata/manifest_valid.yaml",
    32          "testdata/settings_valid.yaml",
    33      ],
    34      embed = [":yamlutils"],
    35      deps = [
    36          "@com_github_protolambda_messagediff//:go_default_library",
    37          "@in_gopkg_yaml//:go_default_library",
    38      ],
    39  )
    40  
    41  go_library(
    42      name = "sdk",
    43      srcs = ["sdk.go"],
    44      importpath = "github.com/actions-on-google/gactions/api/sdk",
    45      deps = [
    46          ":apiutils",
    47          ":request",
    48          "//log",
    49          "//project",
    50          "//project:studio",
    51          "//versions",
    52          "@com_github_pborman_uuid//:go_default_library",
    53          "@in_gopkg_yaml//:go_default_library",
    54      ],
    55  )
    56  
    57  go_test(
    58      name = "sdk_test",
    59      size = "small",
    60      srcs = ["sdk_test.go"],
    61      embed = [":sdk"],
    62      tags = ["notwindows"],
    63      data = [
    64          "//api/examples/account_linking_gsi/actions:actions.yaml",
    65          "//api/examples/account_linking_gsi:manifest.yaml",
    66          "//api/examples/account_linking_gsi/resources/audio:confirmation_01.mp3",
    67          "//api/examples/account_linking_gsi/resources/images:smallLogo.jpg",
    68          "//api/examples/account_linking_gsi/resources/images/zh-TW:smallLogo.jpg",
    69          "//api/examples/account_linking_gsi/settings:settings.yaml",
    70          "//api/examples/account_linking_gsi/settings/zh-TW:settings.yaml",
    71          "//api/examples/account_linking_gsi/webhooks:webhook.yaml",
    72      ],
    73      deps = [
    74          ":request",
    75          ":testutils",
    76          ":yamlutils",
    77          "//project",
    78          "//project:studio",
    79          "@com_github_google_go_cmp//cmp:go_default_library",
    80          "@com_github_google_go_cmp//cmp/cmpopts:go_default_library",
    81          "@org_golang_x_oauth2//:go_default_library",
    82      ],
    83      rundir = ".",
    84  )
    85  
    86  go_library(
    87      name = "apiutils",
    88      srcs = ["apiutils.go"],
    89      importpath = "github.com/actions-on-google/gactions/api/apiutils",
    90      deps = [
    91          "//log",
    92          "@org_golang_x_oauth2//:go_default_library",
    93          "@org_golang_x_oauth2//google:go_default_library",
    94      ],
    95  )
    96  
    97  go_test(
    98      name = "apiutils_test",
    99      size = "small",
   100      srcs = ["apiutils_test.go"],
   101      embed = [":apiutils"],
   102      tags = [
   103          "notwindows",  # b/151969189 for background
   104      ],
   105      deps = [
   106          ":testutils",
   107          "@com_github_google_go_cmp//cmp:go_default_library",
   108          "@com_github_google_go_cmp//cmp/cmpopts:go_default_library",
   109          "@org_golang_x_oauth2//:go_default_library",
   110      ],
   111  )
   112  
   113  go_library(
   114      name = "request",
   115      srcs = ["request.go"],
   116      importpath = "github.com/actions-on-google/gactions/api/request",
   117      deps = [
   118          ":yamlutils",
   119          "//log",
   120          "//project:studio",
   121      ],
   122  )
   123  
   124  go_test(
   125      name = "request_test",
   126      size = "small",
   127      srcs = ["request_test.go"],
   128      embed = [":request"],
   129      deps = [
   130          "@com_github_google_go_cmp//cmp:go_default_library",
   131          "@com_github_google_go_cmp//cmp/cmpopts:go_default_library",
   132          "@com_github_protolambda_messagediff//:go_default_library",
   133          "@in_gopkg_yaml//:go_default_library",
   134      ],
   135  )
   136  
   137  go_library(
   138      name = "testutils",
   139      srcs = ["testutils.go"],
   140      importpath = "github.com/actions-on-google/gactions/api/testutils",
   141  )