Skip to content

Commit f866de0

Browse files
authored
CI: hopefully fix BCR tests (#2220)
**What type of PR is this?** > Test **What package or component does this PR mostly affect?** > all **What does this PR do? Why is it needed?** The format for .bcr/presubmit.yml isn't well-documented. As far as I can tell, it's intepreted by buildkite/bazel-central-registry/bcr_presubmit.py from bazelbuild/bazel-central-registry. The "bcr_test_module" block is important, I shouldn't have deleted that. But it only accepts one module, so go_mod is it. **Which issues(s) does this PR fix?** For #2208 **Other notes for review**
1 parent 47b5773 commit f866de0

File tree

1 file changed

+30
-32
lines changed

1 file changed

+30
-32
lines changed

.bcr/presubmit.yml

Lines changed: 30 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,30 @@
1-
matrix:
2-
platform:
3-
- ubuntu2004
4-
- macos
5-
- windows
6-
bazel: [6.*, 7.*, 8.*]
7-
bcr_variant:
8-
- tests/bcr/go_work
9-
- tests/bcr/go_mod
10-
tasks:
11-
run_test_module:
12-
# Keep in sync with .bazelci/presubmit.yml
13-
name: Run test module
14-
platform: ${{ platform }}
15-
bazel: ${{ bazel }}
16-
working_directory: ${{ bcr_variant }}
17-
shell_commands:
18-
# Regenerate the BUILD files for the test module using Gazelle.
19-
- rm pkg/BUILD.bazel proto/BUILD.bazel
20-
- bazel run //:gazelle -- pkg proto
21-
- bazel run //:gazelle -- update pkg proto
22-
# Verify that bazel mod tidy doesn't remove use_repos required to build and test.
23-
- bazel mod tidy || true # Unsupported on Bazel 6
24-
build_targets:
25-
- //...
26-
- //:gazelle
27-
test_targets:
28-
# Specify these targets explicitly to verify that Gazelle generates them correctly.
29-
- "//pkg:pkg_test"
30-
- "//proto:proto_test"
31-
- "//..."
32-
- "@test_dep//..."
1+
bcr_test_module:
2+
module_path: tests/bcr/go_mod
3+
matrix:
4+
platform:
5+
- ubuntu2004
6+
- macos
7+
- windows
8+
bazel: [6.*, 7.*, 8.*]
9+
tasks:
10+
run_test_module:
11+
# Keep in sync with .bazelci/presubmit.yml
12+
name: Run test module
13+
platform: ${{ platform }}
14+
bazel: ${{ bazel }}
15+
shell_commands:
16+
# Regenerate the BUILD files for the test module using Gazelle.
17+
- rm pkg/BUILD.bazel proto/BUILD.bazel
18+
- bazel run //:gazelle -- pkg proto
19+
- bazel run //:gazelle -- update pkg proto
20+
# Verify that bazel mod tidy doesn't remove use_repos required to build and test.
21+
- bazel mod tidy || true # Unsupported on Bazel 6
22+
build_targets:
23+
- //...
24+
- //:gazelle
25+
test_targets:
26+
# Specify these targets explicitly to verify that Gazelle generates them correctly.
27+
- "//pkg:pkg_test"
28+
- "//proto:proto_test"
29+
- "//..."
30+
- "@test_dep//..."

0 commit comments

Comments
 (0)