From 65becdf3d58db56bacb87ed3b20428d17066eabd Mon Sep 17 00:00:00 2001 From: JEEVITHA KANNAN K S Date: Wed, 23 Oct 2024 00:30:31 +0530 Subject: [PATCH] ci: flutter checks --- .github/workflows/checks.yml | 47 ++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/checks.yml diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml new file mode 100644 index 0000000..fa1f690 --- /dev/null +++ b/.github/workflows/checks.yml @@ -0,0 +1,47 @@ +name: Flutter Checks + +on: + workflow_dispatch: + pull_request: + branches: ["main"] + paths: | + '**/*.dart' + +jobs: + flutter-check: + name: Flutter Checks + runs-on: ubuntu-latest + + steps: + - name: Clone repository + uses: actions/checkout@v4 + + - name: Cache Flutter and Dart dependencies + uses: actions/cache@v4 + with: + path: | + ~/.pub-cache + ~/.flutter + key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.yaml') }} + restore-keys: | + ${{ runner.os }}-pub- + + - name: Setup Flutter + uses: subosito/flutter-action@v2 + with: + channel: stable + + - name: Dart Lints + run: dart format --output=none . --set-exit-if-changed + + - name: Install Firebase-cli + run: curl -sL https://firebase.tools | bash + + - name: Install Flutterfire-cli + run: flutter pub global activate flutterfire_cli 1.0.1-dev.4 + + - name: Configure Flutterfire + run: flutterfire configure --token ${{ secrets.FIREBASE_TOKEN }} -f -p authentication-699e4 -y --platforms android -a com.codeTrenchers.evBookingUser + + - name: Flutter Analyze + run: flutter analyze