-
-
Notifications
You must be signed in to change notification settings - Fork 203
44 lines (36 loc) · 1.07 KB
/
Copy pathflutter_analysis.yml
File metadata and controls
44 lines (36 loc) · 1.07 KB
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
name: Flutter Analysis
on: [pull_request, workflow_dispatch]
jobs:
package-analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Install dependencies
run: flutter pub get
- uses: actions/checkout@v3
- name: Set up git
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"
- name: Format code
run: |
dart format .
if [ $? -eq 1 ]; then
git add .
git commit -m "chore: formatting corrections"
git push
echo "Code has been formatted and changes have been committed and pushed."
fi
echo "All code is properly formatted!"
- name: Analyze code
run: flutter analyze --fatal-infos .
- name: Install DCM
uses: CQLabs/setup-dcm@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run DCM
run: dcm analyze .