Skip to content

Commit

Permalink
Use .bazelignore to allow testing '//...'
Browse files Browse the repository at this point in the history
We did not do so in the past due to how mypy discovered Python files with
Python in the past. Now that we use mypy without Bazel via pre-commit
this restriction no longer applies.
We prefer maintaining a .bazelignore file instead of a detailed test command.
This prevents us missing tests.
  • Loading branch information
martis42 committed Aug 7, 2024
1 parent c826d5f commit 8aa78c4
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 7 deletions.
36 changes: 36 additions & 0 deletions .bazelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
examples
examples/basic_usage
examples/ignoring_includes
examples/recursion
examples/rule_using_dwyu
examples/skipping_targets
examples/support
examples/target_mapping

test/apply_fixes/missing_dependency
test/apply_fixes/needlessly_public_dependency
test/apply_fixes/tool_cli
test/apply_fixes/unused_dependency

test/aspect
test/aspect/alias
test/aspect/complex_includes
test/aspect/defines
test/aspect/external_repo
test/aspect/generated_code
test/aspect/ignore_includes
test/aspect/implementation_deps
test/aspect/includes
test/aspect/platforms
test/aspect/recursion
test/aspect/relative_includes
test/aspect/rule_using_aspect
test/aspect/shared_library
test/aspect/skip_external_targets
test/aspect/skip_tags
test/aspect/target_mapping
test/aspect/tree_artifact
test/aspect/unused_dep
test/aspect/using_transitive_dep
test/aspect/valid
test/aspect/virtual_includes
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Unit tests
run: ./scripts/unit_tests.sh
run: bazel test //...
- name: Build aspect integration tests
run: ./scripts/build_aspect_tests.sh
- name: Build examples
Expand Down
5 changes: 0 additions & 5 deletions scripts/unit_tests.sh

This file was deleted.

2 changes: 1 addition & 1 deletion test_basic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ poetry run pre-commit run --all-files
echo ""
echo "Execute unit tests"
echo ""
./scripts/unit_tests.sh
bazel test //...

echo ""
echo "Build aspect integration tests"
Expand Down

0 comments on commit 8aa78c4

Please sign in to comment.