Overview
The project does not have a fully established CI/CD pipeline in place. However, there are existing scripts and configurations that can support CI/CD automation efforts.
Next Steps
Review existing GitHub Actions workflows located in the
.github/workflows/
directory.Evaluate the Makefile for available commands related to testing, building, and documentation generation.
Explore the
Dockerfile
anddocker-compose.yml
for build and deployment specifications.
GitHub Workflows
The following GitHub Actions workflows are set up to assist in automating various CI/CD tasks:
1. Build Workflow
Location: .github/workflows/build.yml
name: Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.23.3'
- name: Build
run: make binary
2. Test Workflow
Location: .github/workflows/test.yml
name: Test
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.23.3'
- name: Run Tests
run: make test
3. Linting and Validation Workflow
Location: .github/workflows/validate.yml
name: Validate
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Lint Code
run: make lint
4. End-to-End Tests Workflow
Location: .github/workflows/e2e.yml
name: E2E Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.23.3'
- name: Run E2E Tests
run: ./scripts/test/e2e/entry
Scripts
The scripts/
directory contains additional resources that facilitate the build and test process.
Build Scripts
Location: scripts/build/
- Contains several build scripts for creating binaries, validating versions, and more.
Example: Build Binary Script
#!/bin/sh
set -e
TARGET=$1
echo "Building binary for target: $TARGET"
GOOS=${TARGET%%/*} GOARCH=${TARGET##*/} go build -o ./out/docker ./cmd/docker
Test Scripts
Location: scripts/test/
- Includes scripts to run unit tests or integration tests.
Example: E2E Test Script
#!/bin/sh
set -e
echo "Running End-to-End tests"
GOTESTSUM_FLAGS="--format=short-verbose --junitfile=report.xml"
gotestsum $GOTESTSUM_FLAGS ./... | tee test.log
Makefile Functions
The Makefile
offers multiple functions that can be utilized in the CI/CD process:
test
- Runs unit tests.lint
- Lints the codebase.binary
- Compiles the binaries.e2e
- Executes end-to-end tests.
Example: Running Tests with Makefile
make test
Example: Linting with Makefile
make lint
Conclusion
Currently, the CI/CD setup is in its early stages with essential workflows and scripts available. To fully automate the CI/CD process, adoption of the existing GitHub Actions workflows and enhancement of the scripts in the scripts/
directory are recommended.
Source: Directory structure and content provided in the original request.