Skip to content

Commit e0cd9c4

Browse files
committed
Update README
1 parent 10d375c commit e0cd9c4

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,26 @@ The example below follows this convention.
3131

3232
## Minimal Example
3333

34+
### `WORKSPACE` file
35+
36+
```starlark
37+
http_archive(
38+
name = "bazel-erlang",
39+
strip_prefix = "bazel-erlang-master",
40+
urls = ["https://github.com/rabbitmq/bazel-erlang/archive/master.zip"],
41+
)
42+
43+
load("@bazel-erlang//:bazel_erlang.bzl", "bazel_erlang_deps")
44+
45+
bazel_erlang_deps()
46+
```
47+
48+
### `BUILD` file
49+
3450
```starlark
3551
load("@bazel-erlang//:bazel_erlang_lib.bzl", "erlang_lib", "test_erlang_lib")
52+
load("@bazel-erlang//:xref.bzl", "xref")
53+
load("@bazel-erlang//:dialyze.bzl", "dialyze", "plt")
3654
load("@bazel-erlang//:ct.bzl", "ct_suite")
3755

3856
APP_NAME = "my_cool_app"
@@ -48,17 +66,31 @@ test_erlang_lib(
4866
app_version = APP_VERSION,
4967
)
5068

69+
xref()
70+
71+
dialyze()
72+
5173
ct_suite(
5274
name = "unit_SUITE",
5375
)
5476
```
5577

78+
## Compile and run all tests
79+
5680
```shell
5781
bazel test //... \
5882
--@bazel-erlang//:erlang_home=/path/to/erlang \
5983
--@bazel-erlang//:erlang_version=23.2
6084
```
6185

86+
## Run the unit suite only
87+
88+
```shell
89+
bazel test //:unit_SUITE \
90+
--@bazel-erlang//:erlang_home=/path/to/erlang \
91+
--@bazel-erlang//:erlang_version=23.2
92+
```
93+
6294
## Run a single test case
6395

6496
```shell

0 commit comments

Comments
 (0)