# Go: сервис api и storage-agent. Только при изменении их кода или контракта. name: ci / api on: push: branches: [main] paths: - 'services/api/**' - 'api/openapi.yaml' - '.gitea/workflows/ci-api.yml' pull_request: paths: - 'services/api/**' - 'api/openapi.yaml' - '.gitea/workflows/ci-api.yml' concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: api: runs-on: ubuntu-latest defaults: { run: { working-directory: services/api } } steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: { go-version: "1.24", cache-dependency-path: services/api/go.sum } - run: test -z "$(gofmt -l .)" || (gofmt -l . && exit 1) - run: go vet ./... - run: go test -race -coverprofile=coverage.out ./... - run: go build ./cmd/...