Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,31 @@ on:
permissions: read-all

jobs:
changes:
name: Detect Changed Paths
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
outputs:
code: ${{ steps.filter.outputs.code }}
steps:
- name: Checkout Code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Detect Changed Paths
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: filter
with:
filters: |
code:
- 'deploy/**'
- 'scripts/**'
- 'Makefile'
- 'Dockerfile*'
- '.github/workflows/ci.yml'
- '.github/workflows/release.yml'

docs-match-tree:
name: Validate Docs & Version Synchronization
runs-on: ubuntu-latest
Expand All @@ -29,6 +54,8 @@ jobs:

validate-configs:
name: Validate Observability Manifests, Alerts & IaC
needs: [changes]
if: github.event_name == 'push' || needs.changes.outputs.code == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout Code
Expand Down Expand Up @@ -144,6 +171,8 @@ jobs:

smoke-test:
name: Telemetry End-to-End Smoke Test
needs: [changes]
if: github.event_name == 'push' || needs.changes.outputs.code == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout Code
Expand All @@ -152,3 +181,62 @@ jobs:
- name: Run End-to-End Telemetry Smoke Test
run: bash ./scripts/smoke_test.sh

ci-gate:
name: CI Quality Gate
runs-on: ubuntu-latest
if: always()
needs:
- changes
- docs-match-tree
- validate-configs
- smoke-test
steps:
- name: Evaluate CI Quality Gate
run: |
echo "========================================================"
echo "🏁 Evaluating CI Quality Gate"
echo " Event: ${{ github.event_name }}"
echo " Code changes detected: ${{ needs.changes.outputs.code }}"
echo "========================================================"

if [ "${{ needs.changes.result }}" != "success" ]; then
echo "❌ Path detection failed with: ${{ needs.changes.result }}" >&2
exit 1
fi

if [ "${{ needs.docs-match-tree.result }}" != "success" ]; then
echo "❌ Documentation & Version Gate failed with: ${{ needs.docs-match-tree.result }}" >&2
exit 1
fi

SHOULD_VERIFY_CODE="${{ github.event_name == 'push' || needs.changes.outputs.code == 'true' }}"
if [ "$SHOULD_VERIFY_CODE" = "true" ]; then
echo "🔍 Verifying code & infrastructure test suites..."
FAILED=0

if [ "${{ needs.validate-configs.result }}" != "success" ]; then
echo "❌ Validate Observability Manifests, Alerts & IaC: ${{ needs.validate-configs.result }}" >&2
FAILED=1
else
echo "✅ Validate Observability Manifests, Alerts & IaC: success"
fi

if [ "${{ needs.smoke-test.result }}" != "success" ]; then
echo "❌ Telemetry End-to-End Smoke Test: ${{ needs.smoke-test.result }}" >&2
FAILED=1
else
echo "✅ Telemetry End-to-End Smoke Test: success"
fi

if [ "$FAILED" -ne 0 ]; then
echo "❌ CI Quality Gate failed." >&2
exit 1
fi
else
echo "📄 Docs-only change detected. Heavy infrastructure validation and smoke tests safely skipped."
fi

echo "========================================================"
echo "✅ All CI Quality Gates successfully satisfied!"
echo "========================================================"

Loading