Skip to content

fixes

fixes #39

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.24"
- name: Build
run: go build -v ./...
- name: Test with Coverage
run: |
mkdir -p .coverage
go test -v -race -covermode=atomic -coverprofile=.coverage/coverage.out ./cmd/... ./internal/...
- name: Coverage Summary
if: always()
run: |
if [ -f .coverage/coverage.out ]; then
echo "### Test Coverage" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
go tool cover -func=.coverage/coverage.out | grep -E '(total:|^github)' >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
fi
- name: Upload Coverage
if: always()
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: .coverage/coverage.out
retention-days: 14
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.24"
- name: golangci-lint
uses: golangci/golangci-lint-action@v7
with:
version: v2.1.6