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
Update DEVELOPER_GUID, Add Coverage + go ling to Makefile, Run CI tests on all branches (#392)
* .github: run test workflows for all branches, test against 2.9,2.10
Signed-off-by: Jakob Hahn <jakob.hahn@hetzner.com>
* Makefile: use docker golangci-lint, run integration test on `.` folder, change coverage generation
Signed-off-by: Jakob Hahn <jakob.hahn@hetzner.com>
* Update DEVELOPER_GUIDE
Signed-off-by: Jakob Hahn <jakob.hahn@hetzner.com>
---------
Signed-off-by: Jakob Hahn <jakob.hahn@hetzner.com>
Copy file name to clipboardexpand all lines: CHANGELOG.md
+4-2
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,9 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
43
43
- Read, close and replace the http Reponse Body ([#300](https://github.com/opensearch-project/opensearch-go/pull/300))
44
44
- Updated and adjusted golangci-lint, solve linting complains for signer ([#352](https://github.com/opensearch-project/opensearch-go/pull/352))
45
45
- Solve linting complains for opensearchtransport ([#353](https://github.com/opensearch-project/opensearch-go/pull/353))
46
-
- Updated Developer guide to include docker build instructions ([#385]https://github.com/opensearch-project/opensearch-go/pull/385)
46
+
- Updated Developer guide to include docker build instructions ([#385](https://github.com/opensearch-project/opensearch-go/pull/385)
47
+
- Test against version 2.9.0,2.10.0, run tests in all branches, change intergration tests to wait for OpenSearch to start ([#392](https://github.com/opensearch-project/opensearch-go/pull/392))
48
+
- Makefile: use docker golangci-lint, run integration test on `.` folder, change coverage generation ([#392](https://github.com/opensearch-project/opensearch-go/pull/392))
47
49
48
50
### Deprecated
49
51
@@ -59,4 +61,4 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
OpenSearch Go Client builds using [Go](https://golang.org/doc/install) 1.11 at a minimum.
34
+
OpenSearch Go Client builds using [Go](https://golang.org/doc/install) 1.15 at a minimum.
32
35
33
36
#### Docker
34
37
@@ -38,7 +41,7 @@ OpenSearch Go Client builds using [Go](https://golang.org/doc/install) 1.11 at a
38
41
39
42
To build the project on Windows, use [WSL2](https://learn.microsoft.com/en-us/windows/wsl/install), the compatibility layer for running Linux applications.
40
43
41
-
Install ```make```
44
+
Install `make`
42
45
```
43
46
sudo apt install make
44
47
```
@@ -64,11 +67,10 @@ In order to test opensearch-go client, you need a running OpenSearch cluster. Yo
64
67
65
68
### Composing an OpenSearch Docker Container
66
69
67
-
Ensure that Docker is installed on your local machine. You can check by running `docker --version`. Next, navigate to your local OpenSearch repository where the docker-compose.yaml file is stored. Run the following command to build the docker container.
70
+
Ensure that Docker is installed on your local machine. You can check by running `docker --version`. Next, navigate to your local opensearch-go repository. Run the following command to build and start the OpenSearch docker container.
68
71
69
72
```
70
-
cd opensearch/.ci/opensearch
71
-
docker-compose -f docker-compose.yml up
73
+
make cluster.build cluster.start
72
74
```
73
75
74
76
This command will start the OpenSearch container using the `docker-compose.yaml` configuration file. During the build process, the necessary dependencies and files will be downloaded, which may take some time depending on your internet connection and system resources.
@@ -104,6 +106,30 @@ To check the markdown files, run the following command:
104
106
make lint.markdown
105
107
```
106
108
109
+
### Go lint
110
+
111
+
To check all go files, run the following command:
112
+
113
+
```
114
+
make linters
115
+
```
116
+
117
+
## Coverage
118
+
119
+
To get the repository test coverage, run the following command:
120
+
121
+
For the results to be display in your terminal:
122
+
123
+
```
124
+
make coverage
125
+
```
126
+
127
+
For the results to be display in your browser:
128
+
129
+
```
130
+
make coverage-html
131
+
```
132
+
107
133
## Use an Editor
108
134
109
135
### GoLand
@@ -114,3 +140,8 @@ You can import the OpenSearch project into GoLand as follows:
114
140
2. In the subsequent dialog navigate to the ~/go/src/opensearch-go and click **Open**
115
141
116
142
After you have opened your project, you need to specify the location of the Go SDK. You can either specify a local path to the SDK or download it. To set the Go SDK, navigate to **Go | GOROOT** and set accordingly.
143
+
144
+
### Vim
145
+
146
+
To improve your vim experience with Go, you might want to check out [fatih/vim-go](https://github.com/fatih/vim-go).
147
+
For example it correctly formats the file and validates it on save.
0 commit comments