Skip to content

Commit a8543d4

Browse files
committed
Zipmerge: port tests from internal repo
1 parent afadc1f commit a8543d4

File tree

12 files changed

+188
-4
lines changed

12 files changed

+188
-4
lines changed

.github/workflows/zipmerge-test.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: "Test zipmerge code"
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "misc/bazel/internal/zipmerge/**"
7+
- "MODULE.bazel"
8+
- ".bazelrc*"
9+
branches:
10+
- main
11+
- "rc/*"
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
test:
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
- run: |
23+
bazel test //misc/bazel/internal/zipmerge:test

MODULE.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ bazel_dep(name = "nlohmann_json", version = "3.11.3", repo_name = "json")
2424
bazel_dep(name = "fmt", version = "10.0.0")
2525
bazel_dep(name = "gazelle", version = "0.36.0")
2626
bazel_dep(name = "rules_dotnet", version = "0.15.1")
27+
bazel_dep(name = "googletest", version = "1.14.0.bcr.1")
2728

2829
bazel_dep(name = "buildifier_prebuilt", version = "6.4.0", dev_dependency = True)
2930

misc/bazel/internal/zipmerge/BUILD.bazel

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ cc_library(
44
"zipmerge.cpp",
55
],
66
hdrs = ["zipmerge.h"],
7-
visibility = ["//visibility:public"],
8-
# this is to make internal repo be able to keep on testing this code
9-
# before we fully port tests here
107
)
118

129
cc_binary(
@@ -20,4 +17,12 @@ cc_binary(
2017
],
2118
)
2219

23-
#TODO port tests from internal repo
20+
cc_test(
21+
name = "test",
22+
size = "small",
23+
deps = [
24+
":lib",
25+
"@bazel_tools//tools/cpp/runfiles",
26+
"@googletest//:gtest_main",
27+
],
28+
)
Binary file not shown.
Binary file not shown.
Binary file not shown.
22 Bytes
Binary file not shown.
Binary file not shown.
150 Bytes
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)