Repository navigation
Azure Files Search action with live file permission checks, and File Sync Azure Files fix #826
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 | |
| - paullizer-react-v2-ui # Temporary: remove when paullizer-react-v2-ui merges into Development (#1571) | |
| 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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Set up Python | |
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.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 |