This workshop demonstrates progressive CI/CD pipeline implementation using GitHub Actions.
.
├── .github/
│ └── workflows/
│ ├── phase1-basic-checkout.yml
│ ├── phase2-add-go-environment.yml
│ ├── phase3-add-build.yml
│ ├── phase4-add-tests.yml
│ ├── phase5-add-static-analysis.yml
│ └── phase6-add-artifacts.yml
├── cmd/
│ └── webapp/
│ ├── main.go
│ └── main_test.go
├── go.mod
└── README.md
- Checkout source code
- Trigger on push and pull requests
- Setup Go environment (version 1.21.5)
- Install dependencies
- Build Go application
- Create binary
- Run unit tests with coverage
- Generate test reports
- Run golangci-lint
- Run go vet
- Check code formatting
- Create deployable artifacts
- Upload artifacts to GitHub
# Build
go build -o bin/app ./cmd/webapp
# Test
go test -v ./cmd/...
# Run
./bin/app
# or
PORT=8090 ./bin/appAll workflows are located in .github/workflows/ directory. Each phase builds upon the previous one, demonstrating progressive CI/CD implementation.
To use a specific phase:
- Enable the desired workflow
- Push changes to trigger the workflow
- View results in GitHub Actions tab
PORT- Server port (default: 8090)
/- Home page/health- Health check endpoint/version- Version information