Skip to content

Commit

Permalink
Updates npm test script to run bazel test //... in _all_ workspac…
Browse files Browse the repository at this point in the history
…es in the repository.

This is basically the same thing CI does. I also added `test:incompatible` which adds the `--config incompatible` flag to make sure we don't regress ahead of future breaking changes to Bazel.
  • Loading branch information
dgp1130 committed Feb 18, 2023
1 parent 47cf72a commit 3898fbe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"bazel": "bazel",
"ibazel": "ibazel",
"build": "bazel build //...",
"test": "bazel test //...",
"test": "find . -name WORKSPACE.bazel -printf '%h\\n' | sort | xargs -I {} bash -c '(cd {} && bazel test //...)'",
"test:incompatible": "find . -name WORKSPACE.bazel -printf '%h\\n' | sort | xargs -I {} bash -c '(cd {} && bazel test //... --config incompatible)'",
"lint": "npm run -s eslint -- . --max-warnings 0 --report-unused-disable-directives",
"lint-fix": "npm run -s lint -- --fix",
"lint-commit": "git diff \"${COMMIT}~1..${COMMIT}\" --name-only | npm run -s -- filter-lintable | xargs -P 8 -L 1 -I {} bash -c \"git show \\\"${COMMIT}:{}\\\" --diff-filter=d | npm run -s -- eslint --stdin --stdin-filename \\\"{}\\\"\" --max-warnings 0 --report-unused-disable-directives",
Expand Down

0 comments on commit 3898fbe

Please sign in to comment.