Skip to content

🌙 E2E Nightly (latest ThunderID) #11

🌙 E2E Nightly (latest ThunderID)

🌙 E2E Nightly (latest ThunderID) #11

Workflow file for this run

name: 🌙 E2E Nightly (latest ThunderID)
# Runs the same E2E suite as pr-builder.yml's `e2e` job, against the same always-latest ThunderID
# release. The two differ only in trigger: this one runs on a schedule regardless of PR activity,
# so a ThunderID release that breaks something surfaces even on a day with no open PR to catch it.
on:
schedule:
- cron: "30 18 * * *" # 18:30 UTC daily
workflow_dispatch:
env:
NODE_VERSION: "lts/*"
jobs:
e2e-nightly:
name: 🌙 E2E (sample apps, latest ThunderID)
runs-on: ubuntu-latest
timeout-minutes: 40
# Least privilege: this job never pushes, comments, or writes to the repo — only the default
# GITHUB_TOKEN's read access is needed for checkout.
permissions:
contents: read
steps:
- name: 📥 Checkout Code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- name: 🌙 Run E2E suite
uses: ./.github/actions/run-e2e-suite
with:
node-version: ${{ env.NODE_VERSION }}
artifact-name: playwright-report-nightly
# Google Chat step - each failure posts as its own independent message.
- name: 🔔 Send Google Chat Notification on Failure
if: failure()
shell: bash
env:
GOOGLE_CHAT_WEBHOOK: ${{ secrets.GOOGLE_CHAT_WEBHOOK }}
WORKFLOW_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
RUN_NUMBER: ${{ github.run_number }}
COMMIT: ${{ github.sha }}
run: |
if [ -z "$GOOGLE_CHAT_WEBHOOK" ]; then
echo "GOOGLE_CHAT_WEBHOOK secret is not set. Skipping Google Chat notification."
exit 0
fi
FAILURE_DATE=$(date -u +"%d-%m-%Y")
jq -n \
--arg run_number "$RUN_NUMBER" \
--arg commit "${COMMIT:0:8}" \
--arg workflow_url "$WORKFLOW_URL" \
--arg failure_date "$FAILURE_DATE" \
'{
"cards": [{
"header": {
"title": "🔴 JavaScript SDKs E2E Failed",
"subtitle": ("Nightly - " + $failure_date),
"imageUrl": "https://raw.githubusercontent.com/github/explore/main/topics/javascript/javascript.png",
"imageStyle": "AVATAR"
},
"sections": [
{
"widgets": [
{"keyValue": {"topLabel": "Run", "content": ("#" + $run_number)}},
{"keyValue": {"topLabel": "Commit", "content": $commit}}
]
},
{
"widgets": [
{
"buttons": [
{
"textButton": {
"text": "VIEW WORKFLOW RUN",
"onClick": {"openLink": {"url": $workflow_url}}
}
}
]
}
]
}
]
}]
}' > payload.json
if curl -f -X POST -H "Content-Type: application/json" -d @payload.json "$GOOGLE_CHAT_WEBHOOK"; then
echo "✅ Google Chat notification sent successfully"
else
echo "⚠️ Failed to send Google Chat notification"
fi