Skip to content

sync: update from private repo #57

sync: update from private repo

sync: update from private repo #57

Workflow file for this run

# Go CI — golangci-lint + unit tests + coverage report
# Triggered on PR/push to main when Go code changes
name: Go CI
on:
push:
branches: [main]
paths:
- "platform/**"
- "libs/**"
- "go.work"
- "go.work.sum"
- ".golangci.yml"
- ".github/workflows/go-ci.yml"
pull_request:
branches: [main]
paths:
- "platform/**"
- "libs/**"
- "go.work"
- "go.work.sum"
- ".golangci.yml"
- ".github/workflows/go-ci.yml"
permissions:
contents: read
pull-requests: write
jobs:
go-ci:
name: go-ci
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.work
cache: true
- name: Install golangci-lint v2
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.1.6
golangci-lint version
- name: Run golangci-lint
run: golangci-lint run --timeout=5m
- name: Run tests with coverage
run: |
go test ./platform/... ./libs/... \
-coverprofile=coverage.out \
-covermode=atomic \
-race \
-timeout=5m
- name: Display coverage summary
run: |
go tool cover -func=coverage.out | tail -1
echo "---"
echo "Full coverage report:"
go tool cover -func=coverage.out
- name: Upload coverage report
if: always() && hashFiles('coverage.out') != ''
uses: actions/upload-artifact@v4
with:
name: go-coverage
path: coverage.out