-
Notifications
You must be signed in to change notification settings - Fork 11
/
BUILD.bazel
49 lines (43 loc) · 1.41 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
load("@rules_python//python:defs.bzl", "py_binary")
load("@rules_python//python:pip.bzl", "compile_pip_requirements")
load("@vendor-json-repo-pip//:requirements.bzl", "requirement")
load("//:test_utils.bzl", "vendordep_check_test", "year_bundle_test")
# bazel run //:requirements.update
compile_pip_requirements(
name = "requirements",
extra_args = ["--allow-unsafe"],
requirements_in = "requirements.txt",
requirements_txt = "requirements_lock.txt",
)
py_binary(
name = "check",
srcs = ["check.py"],
visibility = ["//visibility:public"],
deps = [
requirement("pyelftools"),
requirement("pefile"),
],
)
py_binary(
name = "check_year_bundle",
srcs = ["check_year_bundle.py"],
visibility = ["//visibility:public"],
)
# Change this for local testing only.
cache_directory = None
YEAR_2024_FILES = glob(["2024/*.json"])
[vendordep_check_test(
allowable_errors = 1,
allowable_warnings = None,
cache_directory = cache_directory,
vendor_file = f,
) for f in YEAR_2024_FILES]
# year_bundle_test(year="2024", year_files=YEAR_2024_FILES) # Disable the test because there a several invalid entries
YEAR_2025_FILES = glob(["2025/*.json"])
[vendordep_check_test(
allowable_errors = 0,
allowable_warnings = None,
cache_directory = cache_directory,
vendor_file = f,
) for f in YEAR_2025_FILES]
year_bundle_test(year="2025", year_files=YEAR_2025_FILES)