Skip to content

Update installation instructions and troubleshooting guide for clarit… #35

Update installation instructions and troubleshooting guide for clarit…

Update installation instructions and troubleshooting guide for clarit… #35

Workflow file for this run

name: Test Status
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
jobs:
test-summary:
name: Test Summary
runs-on: ubuntu-latest
if: always()
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Run tests and generate summary
run: |
echo "# Test Results Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
# Run tests and capture output
if go test -v ./... > test_output.log 2>&1; then
echo "All tests passed." >> $GITHUB_STEP_SUMMARY
else
echo "Some tests failed." >> $GITHUB_STEP_SUMMARY
fi
echo "" >> $GITHUB_STEP_SUMMARY
echo "## Test Coverage" >> $GITHUB_STEP_SUMMARY
# Generate coverage
go test -coverprofile=coverage.out ./... > /dev/null 2>&1
if [ -f coverage.out ]; then
COVERAGE=$(go tool cover -func=coverage.out | grep total | awk '{print $3}')
echo "Total Coverage: **$COVERAGE**" >> $GITHUB_STEP_SUMMARY
fi
echo "" >> $GITHUB_STEP_SUMMARY
echo "## Test Output" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
tail -20 test_output.log >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
- name: Set test status
run: |
if go test ./... > /dev/null 2>&1; then
echo "TEST_STATUS=PASSING" >> $GITHUB_ENV
else
echo "TEST_STATUS=FAILING" >> $GITHUB_ENV
exit 1
fi