-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (45 loc) · 1.9 KB
/
check-submission.yml
File metadata and controls
55 lines (45 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Check Submission
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Check AI_NOTES.md exists
run: |
if [ ! -f "AI_NOTES.md" ]; then
echo "❌ AI_NOTES.md is missing"
exit 1
fi
echo "✅ AI_NOTES.md exists"
- name: Check AI_NOTES.md has content
run: |
# Count non-empty, non-comment lines
CONTENT_LINES=$(grep -v '^#' AI_NOTES.md | grep -v '^<!--' | grep -v '^-->' | grep -v '^$' | wc -l)
if [ "$CONTENT_LINES" -lt 3 ]; then
echo "❌ AI_NOTES.md appears to be empty or has minimal content"
echo "Please document how you used AI during this assignment"
exit 1
fi
echo "✅ AI_NOTES.md has content ($CONTENT_LINES lines)"
- name: Check README.md updated
run: |
# Check if README has candidate's additions (look for common sections)
if ! grep -q -i "decision\|trade-off\|approach\|choice" README.md; then
echo "⚠️ README.md may not document your decisions"
echo "Please add a section explaining your approach and trade-offs"
else
echo "✅ README.md appears to document decisions"
fi
- name: Summary
run: |
echo "## Submission Validation ✅" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "All required files are present and have content." >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "Next steps:" >> $GITHUB_STEP_SUMMARY
echo "1. Reviewer will evaluate your submission" >> $GITHUB_STEP_SUMMARY
echo "2. We'll schedule a follow-up discussion" >> $GITHUB_STEP_SUMMARY