Skip to content

Commit

Permalink
Add a test module
Browse files Browse the repository at this point in the history
  • Loading branch information
nya3jp committed May 23, 2024
1 parent fe66c2f commit 72d802d
Show file tree
Hide file tree
Showing 39 changed files with 2,630 additions and 17 deletions.
32 changes: 17 additions & 15 deletions .bcr/presubmit.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
matrix:
platform:
- debian10
- ubuntu2004
- macos
- macos_arm64
bazel:
- 7.x
tasks:
verify_targets:
name: Verify build targets
platform: ${{ platform }}
bazel: ${{ bazel }}
build_targets:
- "@rules_contest//..."
bcr_test_module:
module_path: testmod
matrix:
platform:
- debian10
- ubuntu2004
- macos
- macos_arm64
bazel:
- 7.x
tasks:
run_test_module:
name: Run test module
platform: ${{ platform }}
bazel: ${{ bazel }}
test_targets:
- //...
8 changes: 6 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ jobs:
with:
name: command.profile.${{ matrix.os }}.gz
path: command.profile.gz
- name: Run tests
- name: Run unit tests
run: bazelisk test --keep_going --test_strategy=exclusive //...
- name: Run e2e tests
run: bazelisk test --keep_going --test_strategy=exclusive --build_event_json_file=$PWD/build-events.jsonl //...
working-directory: testmod
- name: Render test reports
run: bazelisk run //contest:render_test_results -- $PWD/build-events.jsonl
run: bazelisk run @rules_contest//contest:render_test_results -- $PWD/build-events.jsonl
working-directory: testmod
3 changes: 3 additions & 0 deletions testmod/.bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Enable optimization by default.
# Without this setting, C++ programs are much slower.
build -c opt
1 change: 1 addition & 0 deletions testmod/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/bazel-*
8 changes: 8 additions & 0 deletions testmod/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
bazel_dep(name = "rules_contest", version = "0.9.0")
bazel_dep(name = "rules_cc", version = "0.0.9")
bazel_dep(name = "rules_python", version = "0.31.0")

local_path_override(
module_name = "rules_contest",
path = "..",
)
Loading

0 comments on commit 72d802d

Please sign in to comment.