Enhance development workflow with Docker integration
- Updated CONTRIBUTING.md to clarify the use of Makefile targets for running tasks inside Docker, eliminating the need for local Go or Node installations. - Introduced docker-compose.tools.yml for backend and frontend tools, allowing for streamlined testing, linting, and formatting. - Created Dockerfile.tools to set up a Go environment with necessary tools for testing and linting. - Modified Makefile to include separate targets for backend and frontend tests, improving clarity and usability. - Updated documentation in development.md and testing.md to reflect the new Docker-based workflow for running tests and development tasks.
This commit is contained in:
@@ -25,19 +25,19 @@ The backend follows a layered architecture: **Store → Services → Handlers**.
|
||||
|
||||
## Formatting, linting, and tests
|
||||
|
||||
Use Makefile targets for common tasks:
|
||||
Use Makefile targets; they run inside Docker via `docker-compose.tools.yml`, so you do not need Go or Node installed for these tasks:
|
||||
|
||||
```bash
|
||||
make fmt # Format all code (Go + frontend)
|
||||
make lint # Run Go linter (golangci-lint) and frontend ESLint
|
||||
make test # Run Go tests
|
||||
make test # Run backend and frontend tests
|
||||
```
|
||||
|
||||
Or run manually:
|
||||
Or run manually on the host if you have Go and Node:
|
||||
|
||||
- Go: `go fmt ./...` and `golangci-lint run`
|
||||
- Frontend: `npm --prefix frontend-nuxt run lint` and `npm --prefix frontend-nuxt run format`
|
||||
- Tests: `go test ./...`
|
||||
- Tests: `go test ./...` and `npm --prefix frontend-nuxt run test`
|
||||
|
||||
Always format and lint before committing. Add or update tests if you change behaviour.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user