summaryrefslogtreecommitdiffhomepage
path: root/BUILD
diff options
context:
space:
mode:
authorAdin Scannell <ascannell@google.com>2021-01-05 10:40:58 -0800
committergVisor bot <gvisor-bot@google.com>2021-01-05 10:43:04 -0800
commit2a5d3c248fbccfd1f711d027d70ba855625f22f3 (patch)
tree62c5dc39a60a1cfa90cafe7bcd5072576f2011cf /BUILD
parent622db84e4bba468205c85c80a93b8b9a9c2c9ee3 (diff)
Add YAML validation for configuration files.
For validation, the "on" key in existing YAML files is changed to a literal string. In the YAML spec, on is a keyword which encodes a boolean value, so without relying on a specific implementation the YAML files are technically not encoding an object that complies with the specification. PiperOrigin-RevId: 350172147
Diffstat (limited to 'BUILD')
-rw-r--r--BUILD19
1 files changed, 19 insertions, 0 deletions
diff --git a/BUILD b/BUILD
index 6f802fe6a..d19d19866 100644
--- a/BUILD
+++ b/BUILD
@@ -1,5 +1,6 @@
load("//tools:defs.bzl", "build_test", "gazelle", "go_path")
load("//tools/nogo:defs.bzl", "nogo_config")
+load("//tools/yamltest:defs.bzl", "yaml_test")
load("//website:defs.bzl", "doc")
package(licenses = ["notice"])
@@ -50,6 +51,24 @@ doc(
weight = "99",
)
+yaml_test(
+ name = "nogo_config_test",
+ srcs = glob(["nogo*.yaml"]),
+ schema = "//tools/nogo:config-schema.json",
+)
+
+yaml_test(
+ name = "github_workflows_test",
+ srcs = glob([".github/workflows/*.yml"]),
+ schema = "@github_workflow_schema//file",
+)
+
+yaml_test(
+ name = "buildkite_pipelines_test",
+ srcs = glob([".buildkite/*.yaml"]),
+ schema = "@buildkite_pipeline_schema//file",
+)
+
# The sandbox filegroup is used for sandbox-internal dependencies.
package_group(
name = "sandbox",