Skip to content

Commit 7a80900

Browse files
authored
feat: workflow to check analysis and formatting issue (#70)
* feat: workflow to check analysis and formatting issue * fix: firebase config file not present in example
1 parent 0a640fd commit 7a80900

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/code_quality.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
name: Check source code quality
7+
8+
on:
9+
pull_request:
10+
branches: ["main"]
11+
12+
jobs:
13+
lint:
14+
name: Check lints
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: subosito/flutter-action@v2
20+
with:
21+
channel: "stable"
22+
- run: flutter --version
23+
24+
# Get flutter dependencies.
25+
- name: Install dependencies
26+
run: flutter pub get
27+
28+
# Check for any formatting issues in the code.
29+
- name: Verify formatting
30+
run: dart format --set-exit-if-changed .
31+
32+
analyze:
33+
name: Check code analysis
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v4
37+
- uses: subosito/flutter-action@v2
38+
with:
39+
channel: "stable"
40+
- run: flutter --version
41+
42+
# Get flutter dependencies.
43+
- name: Install dependencies
44+
run: flutter pub get
45+
46+
# Statically analyze the Dart code for any errors.
47+
- name: Analyze project source
48+
run: flutter analyze lib

0 commit comments

Comments
 (0)