Repository navigation
Complete notification system implementation with 9 channels, reliabil… #1
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: Notification Tests | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| paths: | |
| - 'HelixCode/internal/notification/**' | |
| - 'HelixCode/test/integration/**' | |
| - '.github/workflows/notification-tests.yml' | |
| pull_request: | |
| branches: [ main, develop ] | |
| paths: | |
| - 'HelixCode/internal/notification/**' | |
| - 'HelixCode/test/integration/**' | |
| - '.github/workflows/notification-tests.yml' | |
| jobs: | |
| unit-tests: | |
| name: Unit Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.24.0' | |
| cache-dependency-path: HelixCode/go.sum | |
| - name: Install dependencies | |
| working-directory: ./HelixCode | |
| run: go mod download | |
| - name: Run unit tests | |
| working-directory: ./HelixCode | |
| run: | | |
| go test ./internal/notification/... -v -cover -coverprofile=coverage.out -covermode=atomic | |
| - name: Generate coverage report | |
| working-directory: ./HelixCode | |
| run: | | |
| go tool cover -func=coverage.out | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| files: ./HelixCode/coverage.out | |
| flags: notifications | |
| name: notification-coverage | |
| fail_ci_if_error: false | |
| integration-tests: | |
| name: Integration Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.24.0' | |
| cache-dependency-path: HelixCode/go.sum | |
| - name: Install dependencies | |
| working-directory: ./HelixCode | |
| run: go mod download | |
| - name: Run integration tests | |
| working-directory: ./HelixCode | |
| run: | | |
| go test ./test/integration/... -v -tags=integration -timeout=5m | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.24.0' | |
| cache-dependency-path: HelixCode/go.sum | |
| - name: Run golangci-lint | |
| uses: golangci/golangci-lint-action@v4 | |
| with: | |
| version: latest | |
| working-directory: HelixCode | |
| args: --timeout=5m ./internal/notification/... | |
| test-summary: | |
| name: Test Summary | |
| runs-on: ubuntu-latest | |
| needs: [unit-tests, integration-tests, lint] | |
| if: always() | |
| steps: | |
| - name: Check test results | |
| run: | | |
| echo "Unit Tests: ${{ needs.unit-tests.result }}" | |
| echo "Integration Tests: ${{ needs.integration-tests.result }}" | |
| echo "Lint: ${{ needs.lint.result }}" | |
| if [ "${{ needs.unit-tests.result }}" != "success" ] || \ | |
| [ "${{ needs.integration-tests.result }}" != "success" ] || \ | |
| [ "${{ needs.lint.result }}" != "success" ]; then | |
| echo "❌ Some tests failed" | |
| exit 1 | |
| else | |
| echo "✅ All tests passed" | |
| fi |