Files
onvif-go/.github/workflows/coverage.yml
T
ProtoTess b4e4982876 Refactor XML response handling in device extended and security tests
- Adjusted formatting in XML response strings for consistency in device_extended_test.go and device_security_test.go.
- Improved readability by aligning XML declaration and body content.
- Updated mock server responses to ensure proper handling of various ONVIF operations.

Enhance device security and storage handling

- Refactored struct field declarations in device_security.go and device_storage_test.go for improved clarity.
- Ensured consistent formatting across struct definitions and XML tags.

Standardize whitespace and formatting across multiple files

- Removed unnecessary blank lines and adjusted indentation in discovery, imaging, media, and PTZ server files.
- Improved overall code readability and maintainability by ensuring consistent formatting.

Update example applications for better readability

- Cleaned up whitespace in example applications to enhance code clarity.
- Ensured consistent formatting in main.go files across various examples.

Refactor server and SOAP handler code for consistency

- Standardized struct field declarations and XML tag formatting in server and SOAP handler files.
- Improved readability by aligning struct fields and ensuring consistent use of whitespace.

General code cleanup and formatting adjustments

- Applied consistent formatting across various files, including types.go and test files.
- Enhanced readability by aligning struct fields and removing unnecessary blank lines.
2025-12-01 00:49:36 +00:00

43 lines
1.2 KiB
YAML

name: Additional Coverage Reports
on:
workflow_run:
workflows: [CI]
types: [completed]
branches: [master, main]
jobs:
# Generate additional coverage analysis if CI passed
coverage-analysis:
name: Coverage Analysis
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'success'
steps:
- name: Checkout code
uses: actions/checkout@d632cb752374ac6c22015e4b4bef1d19db85d69f # v4.2.0
- name: Download artifacts
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: coverage-report
- name: Check coverage percentage
run: |
if [ -f coverage.out ]; then
coverage=$(go tool cover -func=coverage.out | grep total | awk '{print $3}' | sed 's/%//')
echo "Coverage: $coverage%"
# Set threshold to 40%
if (( $(echo "$coverage < 40" | bc -l) )); then
echo "⚠️ Coverage below 40% threshold: $coverage%"
else
echo "✅ Coverage above threshold: $coverage%"
fi
fi
- name: Upload coverage badge
continue-on-error: true
run: |
# Optional: Update badges or notifications
echo "Coverage analysis complete"