From ac17df6190d8ba6ee50013287a6df58f93358bcd Mon Sep 17 00:00:00 2001 From: OutdatedGuy Date: Mon, 11 Dec 2023 01:08:45 +0530 Subject: [PATCH] feat: added quality check workflow --- .github/workflows/code_quality.yml | 45 ++++++++++++++++++++++++++++++ 1 file changed, 45 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..6a18988 --- /dev/null +++ b/.github/workflows/code_quality.yml @@ -0,0 +1,45 @@ +# 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@v3 + - uses: subosito/flutter-action@v2 + with: + channel: "stable" + - run: flutter --version + + # 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@v3 + - 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 .