-
Notifications
You must be signed in to change notification settings - Fork 123
build: bazel build & unit tests #1732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
6eff8c6
to
cdacdd2
Compare
cfba4f1
to
65f3825
Compare
65f3825
to
74596a0
Compare
3ae3462
to
d26e336
Compare
"test:syntaxes": "yarn compile:syntaxes-test && yarn build:syntaxes && jasmine dist/syntaxes/test/driver.js" | ||
"test:syntaxes": "yarn compile:syntaxes-test && yarn build:syntaxes && jasmine dist/syntaxes/test/driver.js", | ||
"test:bazel": "yarn bazel test --test_tag_filters=unit_test //...", | ||
"test:bazel-watch": "yarn ibazel test --test_tag_filters=unit_test //..." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like yarn test
only includes 2 specs now. I think this was actually a result of the previous change. I'm fine with just updating the existing scripts instead of creating new ones.
So test
would be the bazel test and test:inspect
would be bazel test with --config=debug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could flip yarn test
to use bazel in this PR, tho that would mean that CI would be using bazel as well since test.sh
calls yarn run test
. Might be preferable to run bazel CI in a parallel step to the legacy CI for some time before full cut over.
The --config=debug
will only work if you are testing an individual target and the jasmine unit tests are now split across three //common/tests:test
//server/src/tests:test
and //client/src/tests:test
.
So when setting --config=debug
you have to pick which individual target you want to run.
For example bazel test --config=debug //server/src/tests:test
:
$ bazel test --config=debug //server/src/tests:test
WARNING: Streamed test output requested. All tests will be run locally, without sharding, one at a time
INFO: Analyzed target //server/src/tests:test (0 packages loaded, 2 targets configured).
INFO: Found 1 test target...
Debugger listening on ws://127.0.0.1:9229/1cf7a13b-7c85-4fb1-b892-b5c8d545d2ae
For help, see: https://nodejs.org/en/docs/inspector
This wouldn't fit in with the current single test:inspect
script. Perhaps break it out into test:inspect-common
test:inspect-server
and test:inspect-client
?
70f7a83
to
dfe4211
Compare
a5d121f
to
85c5250
Compare
includes common, server, client & syntaxes tests test with, `yarn test:bazel` watch mode using, `yarn test:bazel-watch`
85c5250
to
2e4e8a6
Compare
includes common, server, client & syntaxes tests test with, `yarn test:bazel` watch mode using, `yarn test:bazel-watch` (cherry picked from commit c50ff13)
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Includes common, server, client & syntaxes tests
Test with,
yarn test:bazel
Watch mode using,
yarn test:bazel-watch
Debug a specific test target with
yarn bazel test --config=debug //test:target
Testing on CI in new
bazel-build-and-test
step. Non-bazel CI builds are not touched yet. Cut-over will be in the future.