Files
learning/.gitea/workflows/ci.yml
Ilya 5ab6cc95cd
All checks were successful
CI / test (push) Successful in 20s
Build and Deploy / build-and-deploy (push) Successful in 52s
ci: gitea actions — ci (build/test/lint) + deploy
Стандартный набор по паттерну tasks/booking/telephony:
- .gitea/workflows/ci.yml: go build + go test + golangci-lint v2.4
  на каждый push/PR. Линтер строгий (zero-warnings policy).
- .gitea/workflows/deploy.yaml: на push в main собирается образ,
  пушится в gitea registry (cluster-local + node-local), kubectl
  применяет все k8s/* и роллит deployment с image::<github.sha>.
- .golangci.yml: тот же набор линтеров что в остальных Go-сервисах
  (errcheck/govet/ineffassign/staticcheck/unused) + exclusions
  для типичных «безопасных» свежих ошибок (Close/Encode/Rollback).

REGISTRY_USERNAME/REGISTRY_PASSWORD secrets — те же что у других
сервисов организации (нужно настроить repo-secrets в Gitea Admin
перед первым deploy'ем).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 22:51:51 +03:00

25 lines
710 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: CI
on:
push:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- run: go build ./...
- run: go test ./...
# Линтер — отдельным шагом чтобы test/build падали с понятным diff'ом
# даже если lint warning'ов много. continue-on-error пока не ставим:
# код базы небольшой, ожидаем zero warnings.
- uses: golangci/golangci-lint-action@v7
with:
version: v2.4
args: --config .golangci.yml ./...