diff --git a/.github/workflows/flutter-ci.yml b/.github/workflows/flutter-ci.yml new file mode 100644 index 00000000..39f024dd --- /dev/null +++ b/.github/workflows/flutter-ci.yml @@ -0,0 +1,68 @@ +name: Flutter CI + +on: + push: + branches: [main] + paths: + - 'flutter_module/**' + - 'flutter_sharp/**' + - '.github/workflows/flutter-ci.yml' + pull_request: + branches: [main] + paths: + - 'flutter_module/**' + - 'flutter_sharp/**' + - '.github/workflows/flutter-ci.yml' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: subosito/flutter-action@v2 + with: + channel: stable + cache: true + + - name: Get dependencies + working-directory: flutter_module + run: flutter pub get + + - name: Analyze + working-directory: flutter_module + run: flutter analyze + + test: + name: Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: subosito/flutter-action@v2 + with: + channel: stable + cache: true + + - name: Get dependencies + working-directory: flutter_module + run: flutter pub get + + - name: Run tests + working-directory: flutter_module + run: flutter test + + format-check: + name: Format Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: subosito/flutter-action@v2 + with: + channel: stable + cache: true + + - name: Check formatting + run: dart format --output=none --set-exit-if-changed flutter_module/lib/