Skip to content

Init: Vibe coding take over (#57) #9

Init: Vibe coding take over (#57)

Init: Vibe coding take over (#57) #9

Workflow file for this run

name: CI
on:
push:
branches: [master, dev]
pull_request:
branches: [master, dev]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.25'
- name: golangci-lint
uses: golangci/golangci-lint-action@v7
with:
version: latest
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.25'
- name: Run Tests
run: go test -race -coverprofile=coverage.out ./...
- name: Check Coverage
run: |
echo "=== Overall coverage ==="
TOTAL=$(go tool cover -func=coverage.out | grep '^total:' | awk '{print $3}')
echo "Total: ${TOTAL}"
NUM=$(echo "$TOTAL" | sed 's/%//')
if [ "$(echo "$NUM < 80" | bc -l)" -eq 1 ]; then
echo "FAIL: Total coverage ${TOTAL} is below 80%"
exit 1
fi
echo "PASS: Total coverage ${TOTAL} meets 80% threshold"
vet:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.25'
- name: Vet
run: go vet ./...
- name: Vulnerability Check
run: |
go install golang.org/x/vuln/cmd/govulncheck@latest
govulncheck ./...