From 48259752ad1ba355fda553c9642822e27e445504 Mon Sep 17 00:00:00 2001 From: OutdatedGuy Date: Fri, 13 Dec 2024 05:43:24 +0530 Subject: [PATCH 1/2] feat: workflow to check analysis and formatting issue --- .github/workflows/code_quality.yml | 48 ++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/code_quality.yml diff --git a/.github/workflows/code_quality.yml b/.github/workflows/code_quality.yml new file mode 100644 index 0000000..a0e1147 --- /dev/null +++ b/.github/workflows/code_quality.yml @@ -0,0 +1,48 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Check source code quality + +on: + pull_request: + branches: ["main"] + +jobs: + lint: + name: Check lints + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: subosito/flutter-action@v2 + with: + channel: "stable" + - run: flutter --version + + # Get flutter dependencies. + - name: Install dependencies + run: flutter pub get + + # Check for any formatting issues in the code. + - name: Verify formatting + run: dart format --set-exit-if-changed . + + analyze: + name: Check code analysis + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: subosito/flutter-action@v2 + with: + channel: "stable" + - run: flutter --version + + # Get flutter dependencies. + - name: Install dependencies + run: flutter pub get + + # Statically analyze the Dart code for any errors. + - name: Analyze project source + run: flutter analyze . From f9e401cb17c3ca48592d1d58340db25a3dd12369 Mon Sep 17 00:00:00 2001 From: OutdatedGuy Date: Fri, 13 Dec 2024 05:50:00 +0530 Subject: [PATCH 2/2] fix: firebase config file not present in example --- .github/workflows/code_quality.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/code_quality.yml b/.github/workflows/code_quality.yml index a0e1147..6e9ecc8 100644 --- a/.github/workflows/code_quality.yml +++ b/.github/workflows/code_quality.yml @@ -45,4 +45,4 @@ jobs: # Statically analyze the Dart code for any errors. - name: Analyze project source - run: flutter analyze . + run: flutter analyze lib