Skip to content

Commit 7314484

Browse files
committed
test(ci): add CI monitoring script for release workflow testing
1 parent 79e3bda commit 7314484

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed

scripts/monitor-ci.sh

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
#!/bin/bash
2+
3+
# Monitor CI and release workflow status
4+
# Usage: ./scripts/monitor-ci.sh
5+
6+
set -e
7+
8+
echo "🔍 Monitoring CI and release workflow status..."
9+
echo ""
10+
11+
# Get the current branch
12+
BRANCH=$(git branch --show-current)
13+
echo "📍 Current branch: $BRANCH"
14+
15+
# Get the latest commit hash
16+
COMMIT_HASH=$(git rev-parse HEAD)
17+
echo "🔗 Latest commit: $COMMIT_HASH"
18+
19+
# Get the GitHub repository URL
20+
REPO_URL=$(git config --get remote.origin.url)
21+
if [[ $REPO_URL == *"github.com"* ]]; then
22+
REPO_NAME=$(echo $REPO_URL | sed 's/.*github\.com[:/]\([^/]*\/[^/]*\)\.git.*/\1/')
23+
echo "📦 Repository: $REPO_NAME"
24+
else
25+
echo "❌ Not a GitHub repository"
26+
exit 1
27+
fi
28+
29+
echo ""
30+
echo "🌐 GitHub Actions URLs:"
31+
echo "CI Workflow: https://github.com/$REPO_NAME/actions/workflows/ci.yml"
32+
echo "Release Test Workflow: https://github.com/$REPO_NAME/actions/workflows/release-test.yml"
33+
echo "Release Workflow: https://github.com/$REPO_NAME/actions/workflows/release.yml"
34+
echo ""
35+
36+
echo "📋 Workflow Status:"
37+
echo "1. CI workflow should trigger on push to $BRANCH"
38+
echo "2. Release-test workflow should trigger when CI completes on $BRANCH"
39+
echo "3. Check the URLs above for detailed logs"
40+
echo ""
41+
42+
echo "🧪 Expected Test Results:"
43+
echo "✅ CI workflow completes successfully"
44+
echo "✅ Release-test workflow runs in dry-run mode"
45+
echo "✅ No actual releases are created"
46+
echo "✅ Semantic-release analyzes conventional commits"
47+
echo "✅ Version update script is tested"
48+
echo ""
49+
50+
echo "📝 Recent commits for semantic-release analysis:"
51+
git log --oneline -5 --grep="feat\|fix\|perf\|docs\|style\|refactor\|test\|build\|ci\|chore" || echo "No conventional commits found in recent history"
52+
53+
echo ""
54+
echo "🚀 To check workflow status:"
55+
echo "1. Visit: https://github.com/$REPO_NAME/actions"
56+
echo "2. Look for workflows triggered by the latest commits"
57+
echo "3. Check the logs for any errors or warnings"
58+
echo "4. Verify that no actual releases are created"
59+
echo ""
60+
61+
echo "📊 To view specific workflow run:"
62+
echo "Replace WORKFLOW_RUN_ID with the actual run ID from GitHub Actions"
63+
echo "curl -H 'Authorization: token YOUR_TOKEN' \\"
64+
echo " https://api.github.com/repos/$REPO_NAME/actions/runs/WORKFLOW_RUN_ID"

0 commit comments

Comments
 (0)