From 6b5fabcb9ecad9e74a80a0702ba5d80ef1400d38 Mon Sep 17 00:00:00 2001 From: cevheri Date: Sun, 10 Nov 2024 03:03:16 +0300 Subject: [PATCH] build: add GitHub Actions for Flutter build and test --- .github/workflows/build_and_test.yml | 35 ++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/build_and_test.yml diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml new file mode 100644 index 0000000..e315bf0 --- /dev/null +++ b/.github/workflows/build_and_test.yml @@ -0,0 +1,35 @@ +name: Flutter Build And Test +on: + push: + branches: + - main + - unittest + pull_request: + branches: + - main +jobs: + build: + name: Build and Test + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Flutter + uses: subosito/flutter-action@v2.16.0 + with: + flutter-version: 3.24.4 + channel: stable + - name: Setup Dart + uses: dart-lang/setup-dart@v1.6.5 + with: + dart-version: 3.5.4 + - name: Install dependencies + run: flutter pub get + - name: Analyze + run: flutter analyze + - name: Run tests + run: flutter test + - name: Build APK + run: flutter build apk --release --target lib/main/main_prod.dart + - name: Build Android App Bundle + run: flutter build appbundle --release --target lib/main/main_prod.dart