-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (44 loc) · 1002 Bytes
/
qa.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Flutter Code QA
on:
push:
branches:
- main
paths:
- '**.dart'
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Configure Git
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git pull
- name: Install dependencies
run: flutter pub get
- name: Run QA checks
continue-on-error: true
run: |
flutter analyze
dart fix --apply
dart format .
- name: Commit changes
continue-on-error: true
run: |
git add .
git reset pubspec.lock
git commit -m "[auto]: Fix code style"
git push
- name: Rerun QA checks
run: |
flutter analyze