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
All code in this repo is written in `golang`. The `golang` package is required to build and run the tools.
83
+
84
+
The build system uses mage, which can be installed with `go install github.com/magefile/mage@latest`. Alternatively, a zero-install approach is available through `go run magefile.go` or `./magefile.go`, which automatically downloads the required dependencies without manual installation. All additional build tools are managed automatically by go, and no manual tool installation is required.
85
+
86
+
All other tooling dependencies are handled by `go tool`, which will automatically get the required tools when using `mage`. See [the tools section](./tools/README.md) for more information.
87
+
88
+
This repo contains configs for the `golangci-lint` linter. It is installed as part of the [VSCode go extension](https://marketplace.visualstudio.com/items?itemName=golang.go). It's also optionally available as a [binary release](https://golangci-lint.run/welcome/install/#local-installation).
51
89
52
90
### Mage Commands
53
91
@@ -56,6 +94,7 @@ When you submit a pull request, if you have not already done so, you will be pro
56
94
|`mage -l`| List all available targets | To see all options |
57
95
|`mage all`| Full build, test, and check pipeline | Before submitting PR |
58
96
|`mage build`| Build Go binaries | After code changes |
97
+
|`mage install`| Build Go binaries and install | Outer-loop testing |
59
98
|`mage unit`| Run unit tests | After writing tests |
60
99
|`mage scenario`| Run scenario tests (SLOW) | For major changes |
61
100
|`mage scenarioUpdate`| Update test snapshots | When test expectations change |
@@ -183,6 +222,19 @@ mage -l
183
222
184
223
## Testing
185
224
225
+
Testing can be run with `mage`, or directly using `go test`. The `mage` build system is preferred as it can also automatically run the scenario tests and update the test expectations.
226
+
227
+
```bash
228
+
# Run the unit tests
229
+
mage unit
230
+
231
+
# Run the coverage tests, producing an .html report
232
+
mage coverage
233
+
234
+
# Run scenario tests
235
+
mage scenario
236
+
```
237
+
186
238
See the [testing documentation](docs/how-to/testing.md) for detailed guidelines on writing and running tests.
0 commit comments