integrated QoL pipelines

This commit is contained in:
Oliver 2025-10-28 13:42:00 +01:00
parent fe8cf04268
commit 91fbb4f795

42
.github/workflows/ci.yml vendored Normal file
View file

@ -0,0 +1,42 @@
name: 🧪 Go CI Pipeline
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build-and-test:
name: Build & Test Go Application
runs-on: ubuntu-latest
steps:
# 🛠️ 1. Repository auschecken
- name: Checkout repository
uses: actions/checkout@v4
# 🧰 2. Go einrichten
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
# 📦 3. Dependencies laden
- name: Install dependencies
run: go mod tidy
# 🔍 4. Statische Codeanalyse
- name: Run vet & fmt check
run: |
go vet ./...
test -z "$(gofmt -l .)" || (echo "Code ist nicht formatiert"; gofmt -d .; exit 1)
# 🧱 5. Build
- name: Build application
run: go build -v ./...
# ✅ 6. Tests (optional kann leer bleiben, wenn du noch keine hast)
- name: Run tests
run: go test -v ./... || echo "Keine Tests vorhanden oder übersprungen"