File tree Expand file tree Collapse file tree 2 files changed +47
-28
lines changed Expand file tree Collapse file tree 2 files changed +47
-28
lines changed Original file line number Diff line number Diff line change 1+ name : Flutter CI
2+
3+ on :
4+ push :
5+ branches :
6+ - master # Runs on pushes to the main branch
7+ pull_request :
8+ branches :
9+ - ' **' # Runs on all pull requests
10+
11+ jobs :
12+ flutter-test :
13+ name : Run Flutter Tests
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ # Step 1: Checkout the code
18+ - name : Checkout Code
19+ uses : actions/checkout@v3
20+
21+ # Step 2: Set up Flutter
22+ - name : Setup Flutter
23+ uses : subosito/flutter-action@v2
24+ with :
25+ flutter-version : 3.13.0
26+
27+ # Step 3: Precache Dependencies
28+ - name : Flutter Precache
29+ run : flutter precache
30+
31+ # Step 4: Run Flutter Doctor (Optional, for Debugging)
32+ - name : Flutter Doctor
33+ run : flutter doctor
34+
35+ # Step 5: Run Tests
36+ - name : Run Tests
37+ run : flutter test
38+
39+ # Cache dependencies
40+ - name : Cache Pub Dependencies
41+ uses : actions/cache@v3
42+ with :
43+ path : ~/.pub-cache
44+ key : ${{ runner.os }}-pub-cache-${{ hashFiles('**/pubspec.yaml') }}
45+ restore-keys : |
46+ ${{ runner.os }}-pub-cache-
47+
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments