-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (38 loc) · 1.07 KB
/
Copy pathflutter.yml
File metadata and controls
47 lines (38 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
45
46
47
name: Flutter
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
# 1. Checkout source code
- uses: actions/checkout@v4
# 2. Setup Flutter SDK
- uses: subosito/flutter-action@v2
with:
flutter-version: 'stable' # Bisa diganti ke '3.19.0' misalnya
# 3. Cache Flutter dependencies
- name: Cache Flutter dependencies
uses: actions/cache@v3
with:
path: |
~/.pub-cache
.dart_tool
key: ${{ runner.os }}-flutter-${{ hashFiles('**/pubspec.yaml') }}
restore-keys: |
${{ runner.os }}-flutter-
# 4. Install dependencies
- name: Install dependencies
run: flutter pub get
# 5. Run analysis
- name: Analyze project source
run: flutter analyze
# 6. Run unit tests
- name: Run tests
run: flutter test
# 7. Show Flutter environment info (useful for debugging)
- name: Flutter doctor
run: flutter doctor -v