Skip to content

Latest commit

 

History

History
90 lines (64 loc) · 1.48 KB

development.md

File metadata and controls

90 lines (64 loc) · 1.48 KB

Development Guide

Setup Development Environment

Prerequisites

  • Go 1.21+
  • Docker
  • Git

Local Setup

  1. Clone repository:

    git clone git@github.com:Gurkengewuerz/GitCodeJudge.git
    cd GitCodeJudge
  2. Install dependencies:

    go mod download

Building

Build Binary

go build -o judge ./cmd/main.go

Build Docker Image

docker build -t gitcodejudge -f docker/server/Dockerfile .
docker build -t gitcodejudge -f docker/judge/Dockerfile docker/judge

Testing

Run Tests

go test ./...

Run with Coverage

go test -coverprofile=coverage.out ./...
go tool cover -html=coverage.out

Code Style

Format Code

go fmt ./...

Run Linter

golangci-lint run

Project Structure

.
├── cmd/                    # Application entrypoints
├── internal/               # Private application code
│   ├── config/             # Configuration handling
│   ├── judge/              # Core judge logic
│   ├── models/             # Data models
│   └── server/             # HTTP server
└── test_cases/             # Example test cases

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request