Repository navigation
Admin Settings: enforce the form field contract before stage D moves cards #541
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Python Syntax Check | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - Development | |
| - feature/admin-settings-ia # temporary: Admin Settings IA staging branch | |
| paths: | |
| - 'application/single_app/**.py' | |
| - '.github/workflows/python-syntax-check.yml' | |
| jobs: | |
| syntax-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 | |
| - name: Set up Python | |
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
| with: | |
| python-version: '3.12' | |
| - name: Run Python compilation check | |
| run: | | |
| cd application/single_app | |
| echo "🔍 Running Python compilation checks on all .py files..." | |
| failed_files=() | |
| for file in *.py; do | |
| echo "" | |
| echo "=== Compiling $file ===" | |
| if python -m py_compile "$file" 2>&1; then | |
| echo "✓ $file - OK" | |
| else | |
| echo "✗ $file - FAILED" | |
| failed_files+=("$file") | |
| fi | |
| done | |
| echo "" | |
| echo "================================" | |
| if [ ${#failed_files[@]} -eq 0 ]; then | |
| echo "✅ All Python files compiled successfully!" | |
| exit 0 | |
| else | |
| echo "❌ ${#failed_files[@]} file(s) failed compilation:" | |
| printf ' - %s\n' "${failed_files[@]}" | |
| exit 1 | |
| fi |