Skip to content

feat: add dot spinner for async management operations #12

feat: add dot spinner for async management operations

feat: add dot spinner for async management operations #12

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: '1.26'
- name: golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: latest
- name: Check formatting
run: |
go install mvdan.cc/gofumpt@latest
UNFORMATTED=$(gofumpt -l .)
if [ -n "$UNFORMATTED" ]; then
echo "::error::Unformatted files found. Run 'make fmt' to fix."
echo "$UNFORMATTED"
exit 1
fi
- name: Job Summary
if: always()
run: |
echo "## 🔍 Lint Results" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Check | Status |" >> $GITHUB_STEP_SUMMARY
echo "|-------|--------|" >> $GITHUB_STEP_SUMMARY
echo "| golangci-lint | ${{ steps.lint.outcome == 'failure' && '❌ Failed' || '✅ Passed' }} |" >> $GITHUB_STEP_SUMMARY
echo "| gofumpt | ${{ job.status == 'failure' && '❌ Failed' || '✅ Passed' }} |" >> $GITHUB_STEP_SUMMARY
build:
needs: lint
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.25', '1.26']
steps:
- uses: actions/checkout@v5
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go-version }}
- name: Build
run: go build -o ugm ./cmd/ugm
- name: Test
id: test
run: go test -v ./... 2>&1 | tee test-output.txt
- name: Job Summary
if: always()
run: |
echo "## 🏗️ Build & Test — Go ${{ matrix.go-version }}" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Step | Status |" >> $GITHUB_STEP_SUMMARY
echo "|------|--------|" >> $GITHUB_STEP_SUMMARY
echo "| Build | ✅ Passed |" >> $GITHUB_STEP_SUMMARY
if [ "${{ steps.test.outcome }}" == "failure" ]; then
echo "| Test | ❌ Failed |" >> $GITHUB_STEP_SUMMARY
else
echo "| Test | ✅ Passed |" >> $GITHUB_STEP_SUMMARY
fi
echo "" >> $GITHUB_STEP_SUMMARY
echo "<details><summary>Test Output</summary>" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
cat test-output.txt >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
echo "</details>" >> $GITHUB_STEP_SUMMARY