diff --git a/.github/workflows/PR-open-test-build.yaml b/.github/workflows/PR-open-test-build.yaml index 921d9ce..734bafe 100644 --- a/.github/workflows/PR-open-test-build.yaml +++ b/.github/workflows/PR-open-test-build.yaml @@ -1,7 +1,7 @@ name: Test PR and Push on: pull_request: - branches: [release,dev,master] + branches: [release,dev,master, test/**] jobs: build: name: Test APK @@ -17,9 +17,25 @@ jobs: channel: 'stable' - name: Get Pub Dependencies run: flutter pub get - - name: Run build runner for codegen files + - name: Run Build Runner For Codegen Files run: flutter packages pub run build_runner build --delete-conflicting-outputs - name: Run Dart Analyzer run: flutter analyze . - - name: Attempt release build generation - run: flutter build apk --debug \ No newline at end of file + - name: Generate coverage helper script + run: sh ./coverage_helper_script.bash + - name: Run tests + run: flutter test --coverage + - name: Check Very Good Coverage + uses: VeryGoodOpenSource/very_good_coverage@v1.1.1 + with: + path: "./coverage/lcov.info" + min_coverage: 4.5 + exclude: "**/*.freezed.dart **/*.g.dart **/*.gr.dart **/constants.dart **/custom_theme.dart **/assets_helper.dart" + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v2.0.2 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: ./coverage/lcov.info + verbose: true + - name: Attempt Debug APK Build + run: flutter build apk --debug --dart-define=BASE_URL=${{ secrets.BASE_URL }} \ No newline at end of file diff --git a/android/app/build.gradle b/android/app/build.gradle index 10036db..c3c8c7b 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -42,7 +42,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.inceptrafay.ez_ticketz_app" - minSdkVersion 16 + minSdkVersion 18 targetSdkVersion 30 versionCode flutterVersionCode.toInteger() versionName flutterVersionName