@@ -7,153 +7,202 @@ compatibility with the latest cosmos-sdk and CosmWasm releases.
7
7
## Table of Contents
8
8
9
9
- [ Prerequisites] ( #prerequisites )
10
- - [ Installation] ( #installation )
11
- - [ Build] ( #build )
12
- - [ Testing Prerequisites] ( #testing-prerequisites )
13
- - [ Testing] ( #testing )
14
- - [ Tools & Dependencies] ( #tools--dependencies )
15
- - [ Linting] ( #linting )
16
- - [ Protobuf] ( #protobuf )
17
- - [ Cleaning] ( #cleaning )
10
+ - [ Quick Start] ( #quick-start )
11
+ - [ Build Targets] ( #build-targets )
12
+ - [ Test Targets] ( #test-targets )
13
+ - [ Coverage Targets] ( #coverage-targets )
14
+ - [ Protobuf Targets] ( #protobuf-targets )
15
+ - [ Linting Targets] ( #linting-targets )
16
+ - [ Development Targets] ( #development-targets )
17
+ - [ Utility Targets] ( #utility-targets )
18
+ - [ Help] ( #help )
18
19
19
20
## Prerequisites
20
21
21
- - [ golang] ( https://golang.org )
22
+ - [ golang] ( https://golang.org ) - Go programming language
23
+ - [ docker] ( https://docs.docker.com/get-docker/ ) - Required for protobuf generation and some build targets
24
+ - [ heighliner] ( https://github.com/strangelove-ventures/heighliner ) - Required for integration testing
22
25
23
- ## Installation
26
+ ## Quick Start
24
27
25
- To build locally and install the ` xiond ` binary:
26
-
27
- ``` sh
28
+ ``` bash
29
+ # Build and install xiond
28
30
make install
29
- ```
30
-
31
- To install a prebuilt package via homebrew/apt/yum/apk see [ INSTALLERS.md] ( INSTALLERS.md )
32
31
33
- ## Build
32
+ # Run tests with coverage
33
+ make test-cover
34
34
35
- To build the project:
36
-
37
- ``` sh
38
- make build
35
+ # Get help
36
+ make help
39
37
```
40
38
41
- ## Testing Prerequisites
42
-
43
- - [ golang] ( https://golang.org )
44
- - [ docker] ( https://docs.docker.com/get-docker/ )
45
- - [ heighliner] ( https://github.com/strangelove-ventures/heighliner )
46
-
47
- ## Testing
48
-
49
- There are various test targets available:
50
-
51
- - ` make test ` - Run unit tests
52
- - ` make test-all ` - Run all tests including unit, race, and coverage
53
- - ` make test-unit ` - Run unit tests
54
- - ` make test-integration ` - Run integration tests
55
- - ` make test-race ` - Run tests with race condition detection
56
- - ` make test-cover ` - Run tests with coverage
57
- - ` make benchmark ` - Run benchmarks
58
-
59
- ## Specific Integration Tests
60
-
61
- You can run specific integration tests by using the following commands:
62
-
63
- ``` sh
64
- make test-integration-dungeon-transfer-block
65
- make test-integration-mint-module-no-inflation-no-fees
39
+ ## Build Targets
40
+
41
+ | Target | Description |
42
+ | --------| -------------|
43
+ | ` make install ` | Install the xiond binary |
44
+ | ` make build ` | Build the xiond binary |
45
+ | ` make build-all ` | Build all platforms using Docker |
46
+ | ` make build-local ` | Build for local platform using Docker |
47
+ | ` make build-linux-amd64 ` | Build for Linux AMD64 |
48
+ | ` make build-linux-arm64 ` | Build for Linux ARM64 |
49
+ | ` make build-darwin-amd64 ` | Build for Darwin AMD64 |
50
+ | ` make build-darwin-arm64 ` | Build for Darwin ARM64 |
51
+ | ` make build-windows-amd64 ` | Build for Windows AMD64 |
52
+ | ` make build-docker ` | Build Docker image |
53
+ | ` make build-heighliner ` | Build using Heighliner |
54
+ | ` make release-snapshot ` | Create release snapshot |
55
+ | ` make release ` | Create production release |
56
+
57
+ ## Test Targets
58
+
59
+ | Target | Description |
60
+ | --------| -------------|
61
+ | ` make test ` | Run unit tests |
62
+ | ` make test-unit ` | Run unit tests |
63
+ | ` make test-race ` | Run tests with race detection |
64
+ | ` make test-integration ` | Run integration tests |
65
+ | ` make compile-integration-tests ` | Compile integration test binary |
66
+ | ` make run-integration-test ` | Run specific integration test |
67
+ | ` make test-sim ` | Run simulation tests |
68
+ | ` make test-sim-import-export ` | Run simulation import/export tests |
69
+ | ` make test-sim-multi-seed-short ` | Run multi-seed simulation tests |
70
+ | ` make test-sim-deterministic ` | Run deterministic simulation tests |
71
+
72
+ ### Specific Integration Tests
73
+
74
+ ``` bash
75
+ make test-integration-min-fee
66
76
make test-integration-mint-module-inflation-high-fees
67
77
make test-integration-mint-module-inflation-low-fees
68
- make test-integration-jwt-abstract-account
78
+ make test-integration-mint-module-inflation-no-fees
79
+ make test-integration-mint-module-no-inflation-no-fees
69
80
make test-integration-register-jwt-abstract-account
70
- make test-integration-xion-send-platform-fee
81
+ make test-integration-simulate
82
+ make test-integration-single-aa-mig
83
+ make test-integration-treasury-contract
84
+ make test-integration-treasury-multi
85
+ make test-integration-upgrade-ibc
86
+ make test-integration-upgrade-network
87
+ make test-integration-web-auth-n-abstract-account
71
88
make test-integration-xion-abstract-account
89
+ make test-integration-xion-abstract-account-event
72
90
make test-integration-xion-min-default
91
+ make test-integration-xion-min-multi-denom
92
+ make test-integration-xion-min-multi-denom-ibc
73
93
make test-integration-xion-min-zero
94
+ make test-integration-xion-send-platform-fee
74
95
make test-integration-xion-token-factory
75
96
make test-integration-xion-treasury-grants
76
- make test-integration-min
77
- make test-integration-web-auth-n-abstract-account
78
- make test-integration-upgrade
79
- make test-integration-upgrade-network
80
- make test-integration-xion-mig
97
+ make test-integration-xion-update-treasury-configs
98
+ make test-integration-xion-update-treasury-configs-aa
99
+ make test-integration-xion-update-treasury-params
81
100
```
82
101
83
- ## Tools & Dependencies
102
+ ## Coverage Targets
84
103
85
- To ensure all Go modules are downloaded:
104
+ | Target | Description |
105
+ | --------| -------------|
106
+ | ` make test-cover ` | Run coverage analysis (development) |
107
+ | ` make test-cover-ci ` | Run coverage analysis (CI) |
108
+ | ` make test-cover-validate ` | Validate coverage thresholds |
109
+ | ` make test-cover-html ` | Generate HTML coverage report |
110
+ | ` make test-cover-summary ` | Show coverage summary |
111
+ | ` make test-cover-analyze ` | Detailed coverage analysis |
112
+ | ` make test-cover-run ` | Run tests with coverage |
113
+ | ` make test-cover-filter ` | Filter coverage report |
114
+ | ` make test-cover-clean ` | Clean coverage files |
86
115
87
- ``` sh
88
- make go-mod-cache
89
- ```
116
+ ### Coverage Configuration
90
117
91
- To verify dependencies :
118
+ The coverage system excludes certain packages and has configurable thresholds :
92
119
93
- ``` sh
94
- make go.sum
95
- ```
120
+ - ** Threshold ** : 85% total coverage required
121
+ - ** Excluded packages ** : ` api/ ` , ` cmd/ ` packages
122
+ - ** Reports ** : HTML, filtered, and detailed analysis available
96
123
97
- To draw dependencies graph (requires Graphviz):
124
+ ## Protobuf Targets
98
125
99
- ``` sh
100
- make draw-deps
101
- ```
126
+ ** Note** : All protobuf commands require Docker
102
127
103
- ## Linting
128
+ | Target | Description |
129
+ | --------| -------------|
130
+ | ` make proto-all ` | Full protobuf pipeline |
131
+ | ` make proto-gen ` | Generate protobuf files |
132
+ | ` make proto-gen-gogo ` | Generate gogo protobuf files |
133
+ | ` make proto-gen-openapi ` | Generate OpenAPI specs |
134
+ | ` make proto-gen-swagger ` | Generate Swagger specs |
135
+ | ` make proto-gen-pulsar ` | Generate pulsar protobuf files |
136
+ | ` make proto-format ` | Format protobuf files |
137
+ | ` make proto-lint ` | Lint protobuf files |
138
+ | ` make proto-check-breaking ` | Check for breaking changes |
104
139
105
- To format and lint the code:
140
+ ## Linting Targets
106
141
107
- ``` sh
108
- make format
109
- ```
142
+ | Target | Description |
143
+ | --------| -------------|
144
+ | ` make lint ` | Lint Go code |
145
+ | ` make format ` | Format Go code |
146
+ | ` make format-tools ` | Install formatting tools |
110
147
111
- To just lint the code:
148
+ ## Development Targets
112
149
113
- ``` sh
114
- make lint
115
- ```
150
+ | Target | Description |
151
+ | --------| -------------|
152
+ | ` make go-mod-cache ` | Download go modules to cache |
153
+ | ` make draw-deps ` | Generate dependency graph (requires Graphviz) |
154
+ | ` make all ` | Default target: install, lint, test |
116
155
117
- ## Protobuf
156
+ ## Utility Targets
118
157
119
- ** * Note: The prorobuf commands require Docker
158
+ | Target | Description |
159
+ | --------| -------------|
160
+ | ` make clean ` | Clean build artifacts |
161
+ | ` make distclean ` | Deep clean (includes vendor/) |
162
+ | ` make guard-% ` | Check environment variable is set |
120
163
121
- To generate protobuf files:
164
+ ## Help
122
165
123
- ``` sh
124
- make proto-gen
125
- ```
166
+ The makefile includes comprehensive help documentation:
126
167
127
- To format protobuf files:
168
+ ``` bash
169
+ # Brief help with common targets
170
+ make help
128
171
129
- ``` sh
130
- make proto-format
172
+ # Complete help with all available targets
173
+ make help-full
131
174
```
132
175
133
- To lint protobuf files:
176
+ ### Modular Organization
134
177
135
- ``` sh
136
- make proto-lint
137
- ```
178
+ The makefile is organized into modular components:
138
179
139
- To check for breaking changes in protobuf files:
180
+ - ` make/build.mk ` - Build and release targets
181
+ - ` make/test.mk ` - Testing and simulation targets
182
+ - ` make/coverage.mk ` - Coverage analysis targets
183
+ - ` make/proto.mk ` - Protobuf generation targets
184
+ - ` make/lint.mk ` - Code formatting and linting targets
140
185
141
- ``` sh
142
- make proto-check-breaking
143
- ```
186
+ Each module maintains its own help documentation to ensure targets and documentation stay synchronized.
144
187
145
- ## Cleaning
188
+ ## Examples
146
189
147
- To clean build artifacts:
190
+ ``` bash
191
+ # Development workflow
192
+ make install && make test-cover
148
193
149
- ``` sh
150
- make clean
151
- ```
194
+ # CI workflow
195
+ make build && make test-cover-ci
152
196
153
- To perform a full clean including vendor directory:
197
+ # Full protobuf regeneration
198
+ make proto-all
154
199
155
- ``` sh
156
- make distclean
157
- ```
200
+ # Build for multiple platforms
201
+ make build-all
158
202
159
- For more detailed usage, refer to the individual make targets in the Makefile.
203
+ # Run specific integration test
204
+ make test-integration-xion-abstract-account
205
+
206
+ # Generate dependency visualization
207
+ make draw-deps
208
+ ```
0 commit comments