Refactor code structure for improved readability and maintainability #17
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Dependency Check | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - main | |
| - develop | |
| paths: | |
| - 'go.mod' | |
| - 'go.sum' | |
| pull_request: | |
| branches: | |
| - master | |
| - main | |
| - develop | |
| paths: | |
| - 'go.mod' | |
| - 'go.sum' | |
| schedule: | |
| - cron: '0 0 * * 0' # Weekly on Sunday | |
| jobs: | |
| dependencies: | |
| name: Check Dependencies | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.24' | |
| cache: true | |
| - name: Download dependencies | |
| run: go mod download | |
| - name: Verify dependencies | |
| run: go mod verify | |
| - name: Check for unused dependencies | |
| run: | | |
| go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest | |
| golangci-lint run --no-config -E unused ./... | |
| continue-on-error: true | |
| - name: Check for vulnerable dependencies | |
| run: | | |
| go install github.com/sonatype-nexus-community/nancy@latest | |
| go list -json -m all | nancy sleuth | |
| continue-on-error: true | |
| - name: Generate dependency report | |
| run: | | |
| echo "# Dependency Report" > dependency-report.md | |
| echo "" >> dependency-report.md | |
| echo "## Direct Dependencies" >> dependency-report.md | |
| echo '```' >> dependency-report.md | |
| go list -m all | grep -v "^go " >> dependency-report.md | |
| echo '```' >> dependency-report.md | |
| echo "" >> dependency-report.md | |
| echo "**Generated:** $(date)" >> dependency-report.md | |
| - name: Upload dependency report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dependency-report | |
| path: dependency-report.md | |
| retention-days: 30 |