Skip to content

v1.1.0: Professional enhancements - one-click navigation, CI/CD, offl… #1

v1.1.0: Professional enhancements - one-click navigation, CI/CD, offl…

v1.1.0: Professional enhancements - one-click navigation, CI/CD, offl… #1

Workflow file for this run

name: Curriculum Quality Check
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
syntax-check:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff
pip install pgzero # For weeks 13-18
- name: Syntax Check (compileall)
run: |
# Check all Python files for syntax errors
python -m compileall -q week*/week*.py week*/student_tasks*.py 2>&1 | tee compile_results.txt
if grep -q "SyntaxError" compile_results.txt; then
echo "❌ Syntax errors found!"
exit 1
else
echo "✅ All Python files have valid syntax"
fi
- name: Linting with Ruff
run: |
# Run ruff on all Python files (lenient for educational code)
ruff check week*/week*.py --ignore E501,F841 --format github || true
- name: Check file structure
run: |
echo "📁 Checking curriculum structure..."
# Check that each week has required files
for i in {01..24}; do
week="week${i}_*"
echo "Checking week $i..."
# Find the actual week directory
weekdir=$(ls -d week${i}_* 2>/dev/null | head -1)
if [ -z "$weekdir" ]; then
echo "❌ Week $i directory not found!"
exit 1
fi
# Check for required files
if [ ! -f "$weekdir/teacher_notes.md" ]; then
echo "❌ Missing teacher_notes.md in $weekdir"
exit 1
fi
if [ ! -f "$weekdir/student_tasks.md" ]; then
echo "❌ Missing student_tasks.md in $weekdir"
exit 1
fi
# Check for at least one .py file
if ! ls $weekdir/*.py 1> /dev/null 2>&1; then
echo "❌ No Python file found in $weekdir"
exit 1
fi
echo "✅ Week $i structure valid"
done
echo "✅ All 24 weeks have required files!"
- name: Check documentation exists
run: |
echo "📚 Checking documentation..."
required_docs=(
"docs/QUICKSTART.md"
"docs/TROUBLESHOOTING.md"
"docs/FAQ.md"
"docs/pygame_zero_setup.md"
"docs/microbit_setup.md"
"docs/week6_milestone_rubric.md"
"docs/week12_milestone_rubric.md"
"docs/week18_milestone_rubric.md"
"docs/week24_milestone_rubric.md"
"LICENSE"
"CONTRIBUTING.md"
"CHANGELOG.md"
"requirements.txt"
)
for doc in "${required_docs[@]}"; do
if [ ! -f "$doc" ]; then
echo "❌ Missing required documentation: $doc"
exit 1
fi
done
echo "✅ All required documentation present!"
- name: Summary
if: success()
run: |
echo "🎉 Quality check passed!"
echo "✅ All Python syntax valid across Python ${{ matrix.python-version }}"
echo "✅ All 24 weeks have required files"
echo "✅ All documentation present"