Skip to content

Commit

Permalink
Merge pull request #356 from SatoshiPortal/analyze-actions
Browse files Browse the repository at this point in the history
fix: repair analyze CI
  • Loading branch information
ethicnology authored Dec 17, 2024
2 parents d9d0172 + e1bb117 commit 2095839
Showing 1 changed file with 27 additions and 17 deletions.
44 changes: 27 additions & 17 deletions .github/workflows/analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,36 @@ on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
analyze:
name: Run Flutter Analyze
runs-on: ubuntu-latest

strategy:
matrix:
analyze_mode:
- { name: "Infos allowed, Warnings fatal", mode: "--no-fatal-infos", allow_failure: false }
- { name: "Warnings allowed, Infos fatal: allow failure", mode: "--no-fatal-warnings", allow_failure: true }

steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.13.6'

- name: Install dependencies
run: flutter pub get

- name: Run Flutter Analyze
run: |
if flutter analyze --no-fatal-warnings | grep "warning"; then
exit 1
fi
- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: 3.24.5

- name: Install dependencies
run: flutter pub get

- name: Generate freezed files
run: dart run build_runner build --delete-conflicting-outputs

- name: "${{ matrix.analyze_mode.name }}"
run: flutter analyze ${{ matrix.analyze_mode.mode }}
continue-on-error: ${{ matrix.analyze_mode.allow_failure }}

0 comments on commit 2095839

Please sign in to comment.