You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit simplifies the CI test flow
by
- Using rust latest docker image as base image
- Using cargo make to run the testing process
pull the docker image before building to ensure that latest tag
is the latest release.
It appears that the -Z unstable-options --format json works
on rust stable channel, despite rust documentation to the contrary.
It also replaces the use of ES_TEST_SERVER with
ELASTICSEARCH_URL, for consistency
(cherry picked from commit 6c13b1d)
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+10-15Lines changed: 10 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -40,10 +40,11 @@ The project makes use of the following, which should be installed
40
40
41
41
### Cargo make
42
42
43
-
Cargo make is used to define and configure a set of tasks, and run them as a flow. To see all of the tasks defined
43
+
Cargo make is used to define and configure a set of tasks, and run them as a flow. To see all of the Elasticsearch
44
+
category tasks defined
44
45
45
46
```sh
46
-
cargo make --list-all-steps
47
+
cargo make
47
48
```
48
49
49
50
The `Elasticsearch` category of steps are specifically defined for this project and are defined in
@@ -69,7 +70,7 @@ The `Elasticsearch` category of steps are specifically defined for this project
69
70
a snapshot release like `7.x-SNAPSHOT`
70
71
71
72
```sh
72
-
cargo make test --env STACK_VERSION=<e.g. 7.9.0>
73
+
cargo make test --env STACK_VERSION=7.9.0
73
74
```
74
75
75
76
- Run YAML tests
@@ -81,7 +82,7 @@ The `Elasticsearch` category of steps are specifically defined for this project
81
82
-`TEST_SUITE`: Elasticsearch distribution of `oss` or `xpack`
82
83
83
84
```sh
84
-
cargo make test-yaml --env STACK_VERSION=<e.g. 7.9.0> --env TEST_SUITE=<xpack or oss>
85
+
cargo make test-yaml --env STACK_VERSION=7.9.0 --env TEST_SUITE=oss
85
86
```
86
87
87
88
### Packages
@@ -110,7 +111,9 @@ can be `to_string()`'ed and written to disk, and this is used to create much of
110
111
A small executable that downloads YAML tests from GitHub and generates client tests from the YAML tests. The
111
112
version of YAML tests to download are determined from the commit hash of a running Elasticsearch instance.
112
113
113
-
The `yaml_test_runner` package can be run with `cargo test` to run the generated client tests.
114
+
The `yaml_test_runner` package can be run with `cargo make test-yaml` to run the generated client tests,
115
+
passing environment variables `TEST_SUITE` and `STACK_VERSION` to control the distribution and version,
116
+
respectively.
114
117
115
118
### Design principles
116
119
@@ -141,21 +144,13 @@ The `quote` and `syn` crates help
141
144
An id must always be provided for a delete script API call, so the `delete_script()` function
142
145
must accept it as a value.
143
146
144
-
### Current development setup
145
-
146
-
The required toolchain for packages in the workspace are controlled
147
-
by a `rust-toolchain` file in the root of each package.
148
-
149
-
`elasticsearch` package compiles and runs with rust stable.
150
-
`api_generator` and `yaml_test_runner` packages require rust nightly.
151
-
152
147
### Coding style guide
153
148
154
149
The repository adheres to the styling enforced by `rustfmt`.
155
150
156
151
#### Formatting
157
152
158
-
Rust code can be formatted using [`rustfmt`](https://github.com/rust-lang/rustfmt). Follow the instructions to install.
153
+
Rust code can be formatted using [`rustfmt`](https://github.com/rust-lang/rustfmt) through cargo make.
159
154
160
155
To format all packages in a workspace, from the workspace root
161
156
@@ -167,7 +162,7 @@ It is strongly recommended to run this before opening a PR.
167
162
168
163
#### Clippy
169
164
170
-
[Clippy](https://github.com/rust-lang/rust-clippy) is a bunch of lints to catch common mistakes and improve your Rust code! Follow the instructions to install.
165
+
[Clippy](https://github.com/rust-lang/rust-clippy) is a bunch of lints to catch common mistakes and improve your Rust code!
0 commit comments