diff --git a/.github/workflows/check_code_style_pull_request.yml b/.github/workflows/check_code_style_pull_request.yml new file mode 100644 index 000000000..dd49b4646 --- /dev/null +++ b/.github/workflows/check_code_style_pull_request.yml @@ -0,0 +1,20 @@ +name: Code Style Pull Request + +on: [pull_request] + + +jobs: + linter: + runs-on: ubuntu-latest + name: Lint flutter code + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Set up Flutter + uses: subosito/flutter-action@v1 + - run: flutter pub get + - name: Analyze Flutter + uses: ValentinVignal/action-dart-analyze@v0.11 + with: + fail-on: 'format' + line-length: 100 diff --git a/.github/workflows/check_code_style.yml b/.github/workflows/check_code_style_push.yml similarity index 91% rename from .github/workflows/check_code_style.yml rename to .github/workflows/check_code_style_push.yml index c79cc520c..51975b745 100644 --- a/.github/workflows/check_code_style.yml +++ b/.github/workflows/check_code_style_push.yml @@ -1,11 +1,10 @@ -name: Code Style +name: Code Style Push -on: [push, pull_request] +on: [push] jobs: check-code-style: runs-on: ubuntu-latest - steps: - uses: actions/checkout@v1 - name: Setup Flutter @@ -18,3 +17,4 @@ jobs: run: flutter pub get - name: Analyze the source code run: flutter analyze +