File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed
Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ name : On PR & Push do code check
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+
8+ jobs :
9+ build :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v2
13+
14+ - name : Check file existence
15+ id : check_files
16+ uses : andstor/file-existence-action@v1
17+ with :
18+ files : ' pubspec.yaml'
19+
20+ - name : Setup dart
21+ if : steps.check_files.outputs.files_exists == 'true'
22+ uses : dart-lang/setup-dart@v1
23+
24+ - name : Get dependencies
25+ if : steps.check_files.outputs.files_exists == 'true'
26+ run : dart pub get
27+
28+ - name : Run static code analysis
29+ if : steps.check_files.outputs.files_exists == 'true'
30+ uses : invertase/github-action-dart-analyzer@v1
31+ with :
32+ fatal-infos : true
33+
34+ - name : Dart Code Metrics
35+ if : steps.check_files.outputs.files_exists == 'true'
36+ uses : danylo-safonov-solid/dart-code-metrics-action@52976f8337fb27f3cd46f79728bff916c986ce56
37+ with :
38+ github_token : ${{ secrets.GITHUB_TOKEN }}
39+ fatal_warnings : true
40+ fatal_style : true
41+
42+ - name : Check formatting
43+ if : steps.check_files.outputs.files_exists == 'true'
44+ run : dart format . --set-exit-if-changed
You can’t perform that action at this time.
0 commit comments