chore: bump root package to v1.0.2 with CHANGELOG fix #19
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: Static Analysis | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| jobs: | |
| analyze: | |
| name: Analyze Code | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: stable | |
| cache: true | |
| - name: Get dependencies | |
| run: flutter pub get | |
| - name: Run flutter analyze | |
| run: flutter analyze --no-pub > analyze_report.txt || true | |
| - name: Check for errors | |
| run: | | |
| errors=$(grep -c "error •" analyze_report.txt || true) | |
| warnings=$(grep -c "warning •" analyze_report.txt || true) | |
| infos=$(grep -c "info •" analyze_report.txt || true) | |
| echo "Static Analysis Results:" | |
| echo " Errors: $errors" | |
| echo " Warnings: $warnings" | |
| echo " Infos: $infos" | |
| # Fail if there are errors | |
| if [ "$errors" -gt 0 ]; then | |
| echo "❌ Found $errors errors" | |
| cat analyze_report.txt | |
| exit 1 | |
| fi | |
| # Warn if there are many warnings | |
| if [ "$warnings" -gt 20 ]; then | |
| echo "⚠️ High number of warnings: $warnings" | |
| fi | |
| echo "✅ Static analysis passed" | |
| - name: Upload analyze report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: analyze-report | |
| path: analyze_report.txt |