crosvm/infra/recipes/health_check.py
Dennis Kempin 8a46389c9b infra: Add docs builds to health_check recipe
We had several issues with docs builds breaking in post submit.

BUG=b:239743001
TEST=https://ci.chromium.org/swarming/task/5c745efef5d6ff10

Change-Id: I262e069a0d3ccb4442c074e1bea7b4fb436c313a
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3798976
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Dennis Kempin <denniskempin@google.com>
2022-08-01 22:47:50 +00:00

46 lines
1.3 KiB
Python

# Copyright 2022 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from recipe_engine.post_process import Filter
PYTHON_VERSION_COMPATIBILITY = "PY3"
DEPS = [
"crosvm",
"recipe_engine/buildbucket",
"recipe_engine/context",
"recipe_engine/properties",
"recipe_engine/step",
]
def RunSteps(api):
with api.crosvm.container_build_context():
api.step(
"Self-test dev-container",
[
"vpython3",
api.crosvm.source_dir.join("tools/dev_container"),
"--verbose",
"--self-test",
],
)
for check in ("python", "misc", "fmt", "clippy"):
api.crosvm.step_in_container("Checking %s" % check, ["./tools/health-check", check])
api.crosvm.step_in_container("Checking mdbook", ["mdbook", "build", "docs/book/"])
api.crosvm.step_in_container(
"Checking cargo docs",
["./tools/cargo-doc"],
)
def GenTests(api):
yield (
api.test(
"basic",
api.buildbucket.ci_build(project="crosvm/crosvm"),
)
+ api.post_process(Filter().include_re(r"Checking.*"))
)