blob: fdb6d0f103926f23ef63b8b58942cfecd330b4aa [file]
load("//python:py_library.bzl", "py_library")
load("//python:pytest_test.bzl", "pytest_test")
load("//tests/support:support.bzl", "NOT_WINDOWS")
py_library(
name = "verified_download",
testonly = True,
srcs = ["//dev:verified_download.py"],
imports = ["../../dev"],
target_compatible_with = NOT_WINDOWS,
)
pytest_test(
name = "verified_download_test",
srcs = ["verified_download_test.py"],
data = [
"//.github/actions/download-tool:all_files",
"//dev:verified_download.py",
],
target_compatible_with = NOT_WINDOWS,
deps = [
":verified_download",
"//python/runfiles",
"@pypi//pyyaml",
],
)
py_library(
name = "check_keep_sorted",
testonly = True,
srcs = ["//.github/workflows:check_keep_sorted.py"],
imports = ["../../.github/workflows"],
target_compatible_with = NOT_WINDOWS,
)
pytest_test(
name = "check_keep_sorted_test",
srcs = ["check_keep_sorted_test.py"],
data = [
"//:.pre-commit-config.yaml",
"//.github/workflows:all_files",
],
target_compatible_with = NOT_WINDOWS,
deps = [
":check_keep_sorted",
"//python/runfiles",
"@pypi//pyyaml",
],
)
py_library(
name = "on_comment",
testonly = True,
srcs = ["//.github/workflows:on_comment.py"],
imports = ["../../.github/workflows"],
target_compatible_with = NOT_WINDOWS,
)
pytest_test(
name = "on_comment_test",
srcs = ["on_comment_test.py"],
target_compatible_with = NOT_WINDOWS,
deps = [
":on_comment",
"@pypi//pytest_mock",
],
)
py_library(
name = "on_pr_closed",
testonly = True,
srcs = ["//.github/workflows:on_pr_closed.py"],
imports = ["../../.github/workflows"],
target_compatible_with = NOT_WINDOWS,
)
pytest_test(
name = "on_pr_closed_test",
srcs = ["on_pr_closed_test.py"],
target_compatible_with = NOT_WINDOWS,
deps = [
":on_pr_closed",
"@pypi//pytest_mock",
],
)
pytest_test(
name = "release_build_artifacts_test",
srcs = ["release_build_artifacts_test.py"],
data = [
"//.github/workflows:all_files",
"//dev/platforms:BUILD.bazel",
],
target_compatible_with = ["@platforms//os:linux"],
deps = [
"//python/runfiles",
"@pypi//pyyaml",
],
)
pytest_test(
name = "workflow_permissions_test",
srcs = ["workflow_permissions_test.py"],
data = [
"//.bcr:config_yml",
"//.github/workflows:all_files",
],
target_compatible_with = NOT_WINDOWS,
deps = [
"//python/runfiles",
"@pypi//pyyaml",
],
)
pytest_test(
name = "release_artifacts_test",
srcs = ["release_artifacts_test.py"],
data = [
"//:MODULE.bazel",
"//.github/workflows:create_archive_and_notes.sh",
"//dev/release_artifacts:generate_artifacts_manifest.py",
],
target_compatible_with = ["@platforms//os:linux"],
deps = [
"//python/runfiles",
],
)
py_library(
name = "download_bazel",
testonly = True,
srcs = ["//dev:download_bazel.py"],
imports = ["../../dev"],
target_compatible_with = NOT_WINDOWS,
deps = [":verified_download"],
)
pytest_test(
name = "setup_bazel_test",
srcs = ["setup_bazel_test.py"],
data = [
"//:.bazelrc",
"//:buildbuddy.bazelrc",
"//.github/actions/setup-bazel:all_files",
"//dev:download_bazel.py",
"//dev:verified_download.py",
],
target_compatible_with = NOT_WINDOWS,
deps = [
":download_bazel",
"//python/runfiles",
"@pypi//pyyaml",
],
)
pytest_test(
name = "readthedocs_test",
srcs = ["readthedocs_test.py"],
data = [
"//docs:readthedocs_build.sh",
],
target_compatible_with = NOT_WINDOWS,
deps = [
"//python/runfiles",
],
)