Skip to content

Commit c1bdb18

Browse files
docs: update documentation for CI/CD workflows and automation
- Add CI/CD badges and workflow information to README.md - Document GitHub Actions pipelines (Go CI, SLSA3 releases) - Add comprehensive Makefile commands for development - Update CONTRIBUTING.md with CI requirements and workflow expectations - Remove inappropriate makefile.yml workflow for Go project - Enhance DEVELOPMENT.md with CI/CD pipeline details
1 parent 97df2f6 commit c1bdb18

4 files changed

Lines changed: 141 additions & 29 deletions

File tree

.github/workflows/makefile.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Reverse Proxy - Advanced Go Implementation
22

3+
[![Go CI](https://github.com/surukanti/reverse-proxy/actions/workflows/go.yml/badge.svg)](https://github.com/surukanti/reverse-proxy/actions/workflows/go.yml)
4+
[![Go Report Card](https://goreportcard.com/badge/github.com/surukanti/reverse-proxy)](https://goreportcard.com/report/github.com/surukanti/reverse-proxy)
5+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6+
[![Go Version](https://img.shields.io/badge/go-%3E%3D1.21-blue.svg)](https://golang.org/)
7+
38
A production-ready, feature-rich reverse proxy for Go supporting 10 different use cases with advanced networking capabilities.
49

510
## 🎯 Features
@@ -63,6 +68,42 @@ go build -o bin/proxy ./cmd/proxy
6368
# ... and so on
6469
```
6570

71+
## 🤖 CI/CD & Automation
72+
73+
### GitHub Actions Workflows
74+
75+
This project uses GitHub Actions for automated testing, building, and secure releases:
76+
77+
- **Go CI** - Automated testing and building on every push/PR to `main`
78+
- Runs `go build -v ./...` and `go test -v ./...`
79+
- Tests on Ubuntu with Go 1.24.2
80+
- Ensures code quality and prevents regressions
81+
82+
- **SLSA3 Release** - Secure software supply chain for releases
83+
- Generates provenance attestations for releases
84+
- Uses OpenSSF SLSA framework for build security
85+
- Triggered on release creation or manual dispatch
86+
87+
### Development Commands
88+
89+
```bash
90+
# Quick development cycle
91+
make build # Build the binary
92+
make test # Run all tests
93+
make coverage # Generate coverage report
94+
make fmt # Format code
95+
make lint # Run linter
96+
97+
# Docker development
98+
make build-docker # Build Docker image
99+
make run-docker # Run in Docker
100+
make test-docker # Test Docker container
101+
102+
# Full stack development
103+
make run-compose # Run with Docker Compose
104+
make logs-compose # View all logs
105+
```
106+
66107
## 📁 Example Configurations
67108

68109
All 10 use cases have complete configuration files in `examples/`:

docs/CONTRIBUTING.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ make test
3636
go test ./...
3737
```
3838

39+
5. Run full CI checks locally:
40+
```bash
41+
make fmt # Format code
42+
make vet # Run go vet
43+
make lint # Run linter
44+
make coverage # Generate coverage report
45+
```
46+
3947
## Development Workflow
4048

4149
### 1. Choose an Issue
@@ -145,12 +153,30 @@ Use conventional commit format:
145153
- [ ] Linting passes (`make lint`)
146154
- [ ] Documentation is updated
147155
- [ ] Commit messages follow conventional format
156+
- [ ] CI checks pass (GitHub Actions)
157+
158+
### CI/CD Requirements
159+
All pull requests must pass the automated CI pipeline:
160+
161+
- **Go CI Workflow**: Builds and tests code on Ubuntu with Go 1.24.2
162+
- **Test Coverage**: Maintain or improve test coverage (>80%)
163+
- **Code Quality**: Passes `go vet` and linting checks
164+
- **Formatting**: Code follows Go standards (`go fmt`)
165+
166+
The CI pipeline runs automatically on:
167+
- Every push to `main` branch
168+
- Every pull request targeting `main`
169+
- Manual triggers for releases
148170

149171
### Review Process
150-
1. Automated checks run (tests, linting, etc.)
172+
1. **Automated CI Checks**: GitHub Actions runs comprehensive checks
173+
- Go build and test suite
174+
- Code formatting and linting
175+
- Security scanning (CodeQL)
176+
- Dependency checks
151177
2. Code review by maintainers
152178
3. Address review feedback
153-
4. Merge when approved
179+
4. Merge when approved and CI passes
154180

155181
### Review Guidelines
156182
- Be constructive and respectful

docs/DEVELOPMENT.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,78 @@ docker-compose -f 11-basic-nginx-backends.yaml up --build
5656
Client Request → Middleware Chain → Router → Backend Selection → Proxy → Response
5757
```
5858

59+
## CI/CD Pipelines
60+
61+
### GitHub Actions Workflows
62+
63+
The project uses automated CI/CD pipelines to ensure code quality and reliability:
64+
65+
#### Go CI Workflow (`go.yml`)
66+
- **Triggers**: Push and PR to `main` branch
67+
- **Environment**: Ubuntu latest with Go 1.24.2
68+
- **Steps**:
69+
1. Checkout code
70+
2. Setup Go environment
71+
3. Build project (`go build -v ./...`)
72+
4. Run tests (`go test -v ./...`)
73+
74+
#### SLSA3 Release Workflow (`go-ossf-slsa3-publish.yml`)
75+
- **Triggers**: Release creation or manual dispatch
76+
- **Purpose**: Secure software supply chain
77+
- **Features**:
78+
- Generates provenance attestations
79+
- SLSA Level 3 compliance
80+
- OpenSSF framework integration
81+
82+
### Local Development with Make
83+
84+
The project includes a comprehensive Makefile for development tasks:
85+
86+
```bash
87+
# Core development
88+
make build # Build binary
89+
make test # Run tests
90+
make coverage # Generate coverage report
91+
make fmt # Format code
92+
make vet # Run go vet
93+
make lint # Run golangci-lint
94+
95+
# Docker operations
96+
make build-docker # Build Docker image
97+
make run-docker # Run container
98+
make test-docker # Test container endpoints
99+
make clean-docker # Remove containers/images
100+
101+
# Full stack
102+
make run-compose # Start all services
103+
make logs-compose # View all logs
104+
make clean-compose # Stop and clean services
105+
106+
# Utilities
107+
make help # Show all targets
108+
make version # Show versions
109+
make info # Show build info
110+
```
111+
112+
### Testing Strategy
113+
114+
#### Unit Tests
115+
- Run automatically on every push/PR via GitHub Actions
116+
- Comprehensive coverage of all packages
117+
- Includes race detection for concurrent code
118+
- Generates coverage reports
119+
120+
#### Integration Tests
121+
- Docker-based testing with `make test-docker`
122+
- Tests actual HTTP endpoints and health checks
123+
- Validates CORS, rate limiting, and routing
124+
125+
#### Benchmarking
126+
```bash
127+
make bench # Run performance benchmarks
128+
go test -bench=. -benchmem ./internal/proxy
129+
```
130+
59131
## Development Tasks
60132

61133
### Adding New Middleware

0 commit comments

Comments
 (0)