Skip to content

Commit 5af952e

Browse files
authored
docs: How to run tests on non-Linux (#19)
1 parent 1b74dd7 commit 5af952e

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

docs/DEVELOPMENT.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,31 @@ golangci-lint run --fix
5252
go test -v -race ./internal/...
5353
```
5454

55+
#### Running tests on non-Linux OS
56+
57+
If you're developing on a non-Linux operating system, you can run the tests using Docker:
58+
59+
```bash
60+
docker run --rm -v $(pwd):/app -w /app golang:1.25 go test -v ./internal/...
61+
```
62+
63+
To improve feedback loop performance, you can use Docker volumes to cache Go modules and build artifacts:
64+
65+
```bash
66+
# Create volumes for caching (one-time setup)
67+
docker volume create go-mod-cache
68+
docker volume create go-build-cache
69+
70+
# Run tests with caching
71+
docker run --rm \
72+
-v $(pwd):/app \
73+
-w /app \
74+
-v go-mod-cache:/go/pkg/mod \
75+
-v go-build-cache:/root/.cache/go-build \
76+
golang:1.25 \
77+
go test -v ./internal/...
78+
```
79+
5580
### Slow tests
5681

5782
Slow tests require LimaVM to be installed. They create temporary VMs to test the shim with Docker.

0 commit comments

Comments
 (0)