feat: complete MVP setup with CI/CD, Makefile, docker, and backlog docs

This commit is contained in:
2026-08-24 21:43:21 -07:00
parent 7a51931386
commit 4197d86626
20 changed files with 590 additions and 24 deletions
+72
View File
@@ -0,0 +1,72 @@
name: CI Quality Checks & Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
backend-test:
name: Go Lint & Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
cache: true
- name: Verify Formatting (gofmt)
run: |
UNFORMATTED=$(gofmt -l internal/ cmd/)
if [ -n "$UNFORMATTED" ]; then
echo "Unformatted files found:"
echo "$UNFORMATTED"
exit 1
fi
- name: Run Go Vet
run: go vet ./...
- name: Run Go Unit Tests
run: go test -v ./...
frontend-build:
name: Frontend Typecheck & Build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: web/package-lock.json
- name: Install Frontend Dependencies
working-directory: web
run: npm ci || npm install
- name: TypeScript Check & Vite Build
working-directory: web
run: npm run build
security-scan:
name: Gitleaks Secret Detection
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run Gitleaks Scan
uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+49
View File
@@ -0,0 +1,49 @@
name: Build & Publish Release Image
on:
push:
tags:
- 'v*'
jobs:
docker-release:
name: Build & Push Docker Image
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Gitea / Container Registry
uses: docker/login-action@v3
with:
registry: ${{ secrets.REGISTRY_HOST || 'git.pengzhan.dev' }}
username: ${{ secrets.REGISTRY_USERNAME || github.actor }}
password: ${{ secrets.REGISTRY_TOKEN || secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ secrets.REGISTRY_HOST || 'git.pengzhan.dev' }}/${{ github.repository }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=latest
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max