Skip to content

Commit 1896963

Browse files
committed
feat: add email notification and skip test requiring NEMO service
- Enable email notification (ENABLE_EMAIL_NOTIFICATION: true) - Add email notification step using dawidd6/action-send-mail - Skip test_create_and_monitor_job_to_completion (requires external NEMO service) - Add Required Secrets documentation in header comments - Update runs-on to arc-runners-org-nvidia-ai-bp-4-gpu
1 parent f20a725 commit 1896963

1 file changed

Lines changed: 61 additions & 1 deletion

File tree

.github/workflows/ci.yaml

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,20 @@
4141
# API URL parameter: --dfw-api-url http://localhost:8000
4242
#
4343
# =============================================================================
44+
# Required Secrets:
45+
# =============================================================================
46+
# | Secret | Required | Description |
47+
# |------------------|----------|------------------------------------------|
48+
# | NVIDIA_API_KEY | Yes | NVIDIA API Key for hosted NIM services |
49+
# | NGC_API_KEY | Yes | NGC API Key for container registry |
50+
# | MONGO_USERNAME | Yes | MongoDB root username |
51+
# | MONGO_PASSWORD | Yes | MongoDB root password |
52+
# | REDIS_PASSWORD | Yes | Redis password |
53+
# | HF_TOKEN | No | Huggingface token (optional) |
54+
# | SMTP_USERNAME | No | Gmail for email notifications |
55+
# | SMTP_PASSWORD | No | Gmail app-specific password for SMTP |
56+
#
57+
# =============================================================================
4458

4559
name: CI - Data Flywheel
4660

@@ -100,7 +114,7 @@ env:
100114
# Test configuration
101115
TEST_IMAGE: nvcr.io/rw983xdqtcdp/auto_test_team/blueprint-github-test-image:latest
102116
DFW_API_URL: http://localhost:8000
103-
ENABLE_EMAIL_NOTIFICATION: false
117+
ENABLE_EMAIL_NOTIFICATION: true
104118

105119
jobs:
106120
# ===========================================================================
@@ -850,3 +864,49 @@ jobs:
850864
echo ""
851865
echo "--- Celery Worker Logs ---"
852866
docker compose -f deploy/docker-compose.yaml logs celery_worker --tail=50 2>/dev/null || echo "No Celery logs available"
867+
868+
# =========================================================================
869+
# Email Notification
870+
# =========================================================================
871+
# Sends email notification with CI results to the QA team.
872+
# Requires secrets: SMTP_USERNAME, SMTP_PASSWORD
873+
# =========================================================================
874+
- name: Set Result Output
875+
id: set_result
876+
if: always()
877+
run: |
878+
# Check if all required jobs passed
879+
if [ "${{ needs.preflight.result }}" == "success" ] && \
880+
[ "${{ job.status }}" == "success" ]; then
881+
echo "RESULT=PASS" >> $GITHUB_OUTPUT
882+
else
883+
echo "RESULT=FAIL" >> $GITHUB_OUTPUT
884+
fi
885+
886+
- name: Send Email Notification
887+
uses: dawidd6/action-send-mail@6e71c855c9a091d80a519621b9fd3e8d252ca40c
888+
if: always() && env.ENABLE_EMAIL_NOTIFICATION == 'true'
889+
with:
890+
server_address: smtp.gmail.com
891+
server_port: 587
892+
username: ${{ secrets.SMTP_USERNAME }}
893+
password: ${{ secrets.SMTP_PASSWORD }}
894+
subject: "CI Result: AI Model Distillation for Financial Data - ${{ steps.set_result.outputs.RESULT }}"
895+
896+
897+
html_body: |
898+
<h2>AI Model Distillation for Financial Data CI Notification</h2>
899+
900+
<p><strong>Repository:</strong> ${{ github.repository }}</p>
901+
<p><strong>Branch:</strong> ${{ github.ref_name }}</p>
902+
<p><strong>Commit:</strong> ${{ github.sha }}</p>
903+
<p><strong>Result:</strong> <span style="color: ${{ steps.set_result.outputs.RESULT == 'PASS' && 'green' || 'red' }}; font-weight: bold;">${{ steps.set_result.outputs.RESULT }}</span></p>
904+
905+
<h3>Job Results</h3>
906+
<table border="1" cellpadding="5" cellspacing="0">
907+
<tr><th>Job</th><th>Status</th></tr>
908+
<tr><td>Preflight</td><td>${{ needs.preflight.result }}</td></tr>
909+
<tr><td>Deploy & Test</td><td>${{ job.status }}</td></tr>
910+
</table>
911+
912+
<p><a href="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}">View Workflow Run</a></p>

0 commit comments

Comments
 (0)