File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Flutter
2
+
3
+ on :
4
+ push :
5
+ branches : [ "main" ]
6
+ pull_request :
7
+ branches : [ "main" ]
8
+
9
+ jobs :
10
+ build :
11
+ runs-on : ubuntu-latest
12
+
13
+ steps :
14
+ # 1. Checkout source code
15
+ - uses : actions/checkout@v4
16
+
17
+ # 2. Setup Flutter SDK
18
+ - uses : subosito/flutter-action@v2
19
+ with :
20
+ flutter-version : ' stable' # Bisa diganti ke '3.19.0' misalnya
21
+
22
+ # 3. Cache Flutter dependencies
23
+ - name : Cache Flutter dependencies
24
+ uses : actions/cache@v3
25
+ with :
26
+ path : |
27
+ ~/.pub-cache
28
+ .dart_tool
29
+ key : ${{ runner.os }}-flutter-${{ hashFiles('**/pubspec.yaml') }}
30
+ restore-keys : |
31
+ ${{ runner.os }}-flutter-
32
+
33
+ # 4. Install dependencies
34
+ - name : Install dependencies
35
+ run : flutter pub get
36
+
37
+ # 5. Run analysis
38
+ - name : Analyze project source
39
+ run : flutter analyze
40
+
41
+ # 6. Run unit tests
42
+ - name : Run tests
43
+ run : flutter test
44
+
45
+ # 7. Show Flutter environment info (useful for debugging)
46
+ - name : Flutter doctor
47
+ run : flutter doctor -v
You can’t perform that action at this time.
0 commit comments