feat(gemini): add rate limit retry and improve thought signature pers… #1471
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: Architecture Check | |
| on: | |
| push: | |
| branches: [ main, dev ] | |
| pull_request: | |
| branches: [ main, dev ] | |
| jobs: | |
| architecture-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e .[dev] | |
| - name: Run architectural linter on changed files | |
| run: | | |
| if [ "${{ github.event_name }}" == "pull_request" ]; then | |
| # Get list of changed Python files in the PR | |
| git fetch origin ${{ github.base_ref }} --depth=1 | |
| CHANGED_FILES=$(git diff --name-only origin/${{ github.base_ref }} | grep "\.py$" || true) | |
| else | |
| # Get list of changed Python files in the push | |
| git fetch origin ${{ github.event.before }} --depth=1 | |
| CHANGED_FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep "\.py$" || true) | |
| fi | |
| if [ -z "$CHANGED_FILES" ]; then | |
| echo "No Python files changed, skipping architectural checks." | |
| exit 0 | |
| fi | |
| echo "Checking architectural patterns in changed files:" | |
| echo "$CHANGED_FILES" | |
| # Run the enhanced architectural linter on each changed file | |
| EXIT_CODE=0 | |
| for file in $CHANGED_FILES; do | |
| if [[ "$file" == *"/tests/"* ]] || [[ "$file" == *"migrations"* ]] || [[ "$file" == *"generated"* ]]; then | |
| echo "Skipping test/generated file: $file" | |
| continue | |
| fi | |
| echo "Checking: $file" | |
| python scripts/architectural_linter.py "$file" || EXIT_CODE=1 | |
| done | |
| exit $EXIT_CODE |